Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: what's a "reasonable" length of time to keep a cursor open?
mh_at_pixar.com wrote:
> I've got a long running job that is using the database to queue
> up entries to be processed.
>
> Sometimes a couple of million items might be dumped in the queue,
> needing a couple of days to process.
>
> Of course, keeping a cursor open for several days is not a good
> idea and will probably get an oracle error when the redo log
> or somesuch is expired.
>
> So, I periodically close my active select cursor and reissue
> the query.
>
> What's a "reasonable" length of time to keep a cursor open?
> I'm not looking for a hard and fast number, just a general
> concensus. Is one hour for keeping a cursor open raising
> eyebrows? one minute?
>
> Many TIA!
> Mark
And your Oracle version is?
Load the records into a global temporary table if they are available in your version.
But I've got a problem with any process that takes several days to complete. It might be worth investing your efforts into tuning the offending process.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Wed Aug 22 2007 - 22:33:25 CDT