-->
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: Large result sets
PostPosted: Mon Jan 24, 2005 4:15 pm 
Newbie

Joined: Mon Dec 13, 2004 12:37 pm
Posts: 18
Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:
2.1.7

Please help me with this issue :)

I am getting an out of memory exception when I retrieve a large collection of objects. I have read the following post:

http://blog.hibernate.org/cgi-bin/blosx ... batch.html

and several others trying to figure out what I am doing wrong but its not at all clear to me.

I ran a memory profiler and all of the "lost" memory gets stuck in a hibernate FastHashMap.

I call Query.setFetchSize().
Every 20 or so objects I call session.flush() and session.clear().

I am executing a native SQL so I am no using the query.scroll() method.

However, it seems I should be able to iterate through a collection of any size by initially setting fetch size and then clearing the session cache.

I can probably put together a small block of code to demonstrate this if necessary, but I just was wondering if anyone had any ideas?

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.