Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate and performance issues

 
andy kumar
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic