-->
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.  [ 1 post ] 
Author Message
 Post subject: Bulk initialization of collections
PostPosted: Wed Dec 06, 2006 10:17 am 
Newbie

Joined: Wed Dec 06, 2006 9:46 am
Posts: 1
Hello all,

in a product export scenario, I need to initialize products from a query result set with a large amount of rows (say up to 100.000).
Products have 6 different collections of dependent objects each, so I cannot use join fetching to initialize the collections (cartesian product).
So hibernate initializes collections per product with individual selects, which is way too slow.

My first approach would be to issue queries with join for each of the collections, then iterate all 6 queries in parallel and initialize collection objects from these query results.

Problem is that the where clause of all queries is identical and quite complex (query objects satisfying view definition spread over several tables).

Is it possible to reuse basic query for the different joins that need to be performed on the results?

Are there solutions that give better performance?


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

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.