*
The moose likes Object Relational Mapping and the fly likes Which yields the best performance? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Which yields the best performance?" Watch "Which yields the best performance?" New topic
Author

Which yields the best performance?

Jehan Jaleel
Ranch Hand

Joined: Apr 30, 2002
Posts: 196
Which of these are the best for performance in terms of data retrieval..

Criteria API
HQL in Java code
Native SQL in java code
Named query in hbm file

Thanks.
Christian Dillinger
Ranch Hand

Joined: Jul 20, 2009
Posts: 188
HQL, Criteria and NamedQueries are trandformed into PreparedStatements, so there cannot be any difference (for the same statement). Native SQL might be faster, because you can do some handmade "magic" Hibernate cannot do.
 
 
subject: Which yields the best performance?
 
Similar Threads
Which server is best
weblogic performance/ application performance
Performance of JVM of J2SE1.4, Java5, Java6
books
Chat Application