-->
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: Retrieve large no: of records
PostPosted: Wed Aug 25, 2010 11:17 am 
Newbie

Joined: Thu Jul 29, 2010 5:24 pm
Posts: 5
Hi,

I want to retrieve say 100,000 records from the database table. I want to do it in batches of 1000 so that it doesnt throw an out of memory error. Is there any way to fetch the first 1000 records and then the next 1000 until all the records are fetched.
How will hibernate know to fetch the next 1000 records. Is it possible for hibernate to track the records that is already retrieved so that it can retrieve the next batch of records.

Thanks


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.