jQuery in Action, 2nd edition*
The moose likes Performance and the fly likes Hibernate and performance issues Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Performance
Bookmark "Hibernate and performance issues" Watch "Hibernate and performance issues" New topic
Author

Hibernate and performance issues

andy kumar
Ranch Hand

Joined: Jun 08, 2009
Posts: 57
I am working on a project that uses hibernate but we are having lot of issues in performance due to hibernate. Some of the members of my group are convinced that hibernate is no good and only results in an extra level of complexity, they think it is better to go with normal jdbc code.

What do you guys think, can or should hibernate be avoided? Do you have any similar experience working with hibernate.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Poorly implemented Hibernate performs badly. Well implemented (and suitably tuned) Hibernate performs quite well. For example, straight JDBC does not hit any of the caches available to Hibernate. Hibernate will generate some SQL that it is relatively easy to see could be optimized, most of which can be tuned by tuning queries and mappings. Where this is a real headache (and you'll only know this if you've profiled the SQL) you can use direct SQL from Hibernate.

Do your colleagues have any concrete reasons to point the finger at Hibernate? There is no point doing anything with regards to performance changes without a definite reason.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Hibernate and performance issues