-->
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.  [ 3 posts ] 
Author Message
 Post subject: performance Optimization | Tip required
PostPosted: Mon Sep 10, 2007 3:22 am 
Newbie

Joined: Mon Jan 29, 2007 7:29 am
Posts: 6
Hi,

I am facing an optimization issue with a Query(HQL) which fetches around 400 records from the database and has 15 associations in the hbm mapping file.

The associations are getting fetched Eagerly, still the query is taking around 10 secs to execute.

I have tried using detached criteria but the execution hangs because of the left outer joins.

please provide some pointers on this as to how this could be optimized.

-Sameer


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 10, 2007 5:57 am 
Expert
Expert

Joined: Thu Sep 04, 2003 8:23 am
Posts: 368
You can use subselect fetching if you have a lot of relation

http://www.hibernate.org/hib_docs/v3/re ... e-fetching

Join fetch is not recommended for more than one '*-to-many' association

_________________
Seb
(Please don't forget to give credits if you found this answer useful :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 10, 2007 6:36 am 
Newbie

Joined: Mon Jan 29, 2007 7:29 am
Posts: 6
Hi,
Thanks for the reply, but the problem that i am facing is due to many-to-one mappings and not the other way around.
That's why subselect is not going to work, since HQL is already making it work like a subselect and repetitive selects are bringing the performance down .

-Sameer


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