-->
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: Massive batch fetch using sys_refcursor..
PostPosted: Mon Jul 13, 2009 8:48 pm 
Newbie

Joined: Mon Jul 13, 2009 7:56 pm
Posts: 5
Hi,

I am trying to fetch around 4-20 mn rows using a sys_refcursor (Oracle 10g ) and multiple java threads (each specifies a rownum range for the cursor query). I am also using the Hibernate ORM feature - ResultTransformer to bind it to a non-entity for subsequent processing and flushing to text files. I do evict the list flushed to files periodically along with the foll settings:

session.setCacheMode(CacheMode.IGNORE);
session.setFlushMode(FlushMode.MANUAL);

Do you foresee any issue with this - especially OOM related?


Any ideas or alternatives?

Thanks..


Top
 Profile  
 
 Post subject: Re: Massive batch fetch using sys_refcursor..
PostPosted: Tue Jul 14, 2009 4:06 pm 
Newbie

Joined: Mon Jul 13, 2009 7:56 pm
Posts: 5
I am able to accomplish that using ScrollableResults and ScrollMode.SCROLL_INSENSITIVE..
I would assume that query.list() in context of the SYS_REFCURSOR with a non-entity mapped through ResultTransformer would do something similar.
Basically, what I am expecting here is to do a
sqlQuery.list() on a query that returns a sys_RefCursor, assuming that the list is a proxy and progressively, hibernate will fetch records from the DB as I Iterate over the list. Even with periodic eviction, I keep getting OOM's.


Any suggestions?

Thanks..


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.