aspose file tools
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 The Software Craftsman this week in the Agile 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: 189
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.
 
jQuery in Action, 2nd edition
 
subject: Which yields the best performance?