This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Which yields the best performance?