1.

What Are The Problems In Hibernate But Not In Jdbi?

Answer»
  • Hibernate can generate large numbers of unnecessary queries, even due to minor misconfigurations. When PROPERLY configured it still often performs worse than simple SQL queries.
  • Hibernate is definitely more of an abstraction, and in my opinion is great for a simple apps. But my in experience, as things get more complicated the abstraction leaks. You end up having to put debug statements to see the queries produced by hibernate, tweaking the annotation to get different queries, hopefully with a more performant query plan.
  • Hibernate is opinionated about your data structure. When you have a data structure that doesn’t folow it’s notion of keys and relationships the Object-relational IMPEDANCE Mismatch is GOING to hit you even harder. Hybrid-ORM frameworks, such as JDBI, allow more flexibility when mapping to objects and thus provide more runway before you have to start coding significant work arounds for this issue.
  • You don’t see the performance problems until you scale! When your application is small and simple EVERYTHING seems to go along SMOOTHLY, then you scale and all of a sudden hibernate queries are the root of your performance problems.



Discussion

No Comment Found