-->
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.  [ 2 posts ] 
Author Message
 Post subject: Huge Data fetching problem
PostPosted: Tue Jun 28, 2005 9:22 am 
Newbie

Joined: Fri Jun 10, 2005 12:25 pm
Posts: 6
Hi Guys

Hibernate version: Hibernate3
Oracle version: Oracle9
Java Version: j2sdk1.4.2_04

I have database where I have more than 100 thousand rows in one table.
If I try to fetch all at a time, I am getting java.lang.OutOfMemoryError

And if I try to fetch page by page e.g. by setting
criteria.setFirstResult(startIndex);
criteria.setMaxResults(25000);
Then in second or third query, I am again getting the same error.

How do I know what is a capacity of session to hold N number of objects? or I shall do some smart caching or flushing? Please suggest some intelligent way to get rid of outOfMemoryError.

FYI: The object I am facing is internally has references to three more tables. Ultimately I am fetching N * 4 objects. And my primary objects has more than 15 columns, rest of the objects has 3 columns only.

Thanks and Regards
Sunil


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 01, 2005 10:09 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
There is a dedicated chapter in the ref doc for what you want to do.

_________________
Emmanuel


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