-->
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.  [ 4 posts ] 
Author Message
 Post subject: Query optimization suggestion
PostPosted: Thu Feb 16, 2006 1:31 pm 
Beginner
Beginner

Joined: Wed Sep 28, 2005 5:30 pm
Posts: 25
Hi,

I ran some Hibernate code through a profiler and noticed that AbstractSessionImpl.getHQLQueryPlan() is invoked both from Session.createQuery() and Query.list(). In both cases, autoFlushIfNecessary() is invoked and this operation is rather expensive.

Why do you need to flush the session *both* at Query creation and at query invocation? Isn't it enough to only flush at invocation time?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 16, 2006 1:33 pm 
Expert
Expert

Joined: Tue Dec 07, 2004 6:57 am
Posts: 285
Location: Nürnberg, Germany
We even had a problem with this method during session.createQuery...

A comment from the hibernate team to this would be very helpful

http://forum.hibernate.org/viewtopic.php?t=955629


Top
 Profile  
 
 Post subject: Re: Query optimization suggestion
PostPosted: Fri Feb 17, 2006 4:11 am 
Beginner
Beginner

Joined: Wed Sep 28, 2005 5:30 pm
Posts: 25
A few days go by and ... nothing?!

Guys, I would appreciate it if you at least let me know whether my idea holds water or not.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 18, 2006 7:59 pm 
Beginner
Beginner

Joined: Wed Sep 28, 2005 5:30 pm
Posts: 25
Posted JIRA issue: http://opensource2.atlassian.com/projec ... e/HHH-1508


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.