-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Hibernate Performance query (Loader Class)
PostPosted: Wed Dec 05, 2007 5:10 am 
Beginner
Beginner

Joined: Fri Apr 20, 2007 1:07 am
Posts: 23
Hello,

Using Hibernate Version 3.3.0. I have a general query about the performance of the internal workings of a simple hibernate select statement

I have got a simple query which I have mapped within the orm.xml file which hits the DB and gets around 10 rows...I run the same test case twice in a loop...While the first iteration took around 450 ms , the second took only around 26 ms...Turning on profiling and logging I was able to figure out that the the follwing three methods in the first iteration took the majority of the time

Loader.prepareQueryStatement()
Loader.getResultSet() and
Loader.getRowFromResultSet() while during the second iteration, the three same methods had a drastic drop in time taken....

Since I have mapped the query in the orm.xml file, I presume the query plan is not executed even for the the first iteration...Could someone pls shed some light on this...It would be quite useful

Thanks...Vijay


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 05, 2007 8:36 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
well you'll have to show some code. Microbenchmarks are not really reliable.

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.