-->
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: Multiple collection pagination
PostPosted: Fri Jul 09, 2004 5:11 pm 
Newbie

Joined: Thu Jul 08, 2004 6:07 pm
Posts: 4
Hello,

In our existing application there are entities(master) with many (about 10) collections of subentities(details) of different types, all persisted on table-per-class basis.
A typical query returns tens of thousands of entities so pagination is used. Whenever we retreive the entities, we are always interested in retreiving all the subentities contained in them.
Currently, we are using Sybase JDBC. To reach the required response time and limit the number of database calls we:
1. query entity table according to a criteria and store id's(primary keys) along with IDENTITY column to a temp table
2. join the temp table with the entity table and order by primary key
3. for every collection, do a join of temp table with sub entity tables and order by primary key.
4. For pagination, we use the IDENTITY column in the temp table to restrict the query result stored in the table table.
5. So if there N different subentities in an entity, for each page, we make 1 (to populate temp table) + 1 (entity resultset) + N (for subentities resultsets) calls to the Sybase server. We co-relate the N+1 result sets ourselves in the application process.

We are satisfied with the performance. Now we are interested in using Hibernate for flexibility. What is a good solution to this problem using Hibernate?

Thank you


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.