aspose file tools*
The moose likes Object Relational Mapping and the fly likes performance tuning of hibernate select query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "performance tuning of hibernate select query" Watch "performance tuning of hibernate select query" New topic
Author

performance tuning of hibernate select query

Amitosh Mishra
Ranch Hand

Joined: Feb 11, 2010
Posts: 49
Hi all,
i am new to hibernate and i am trying to do some basic select operation on table i am able to do this but beginning the transaction is taking too much time.

below is my code

output


please let me know how can i optimize this.
it would be great if i get some documentation on hibernate performance tuning.

regards
Amitosh
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1680
    
    7

What are your metrics if you remove the system.out.println statements? Maybe do all of that at the end so it is not factoring into your times. Print lines can be slow depending on the environment. As far as query creation using named queries is faster as the query then only needs to be parsed once not each time it is called. This will save you if the query is used often. As for the query itself make sure your tables are indexed properly.


[How To Ask Questions][Read before you PM me]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: performance tuning of hibernate select query