Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: RE: Too many db calls: Follow up question

RE: RE: Too many db calls: Follow up question

From: Connor McDonald <hamcdc_at_yahoo.co.uk>
Date: Tue, 19 Nov 2002 01:11:57 -0800
Message-ID: <F001.00506491.20021119011157@fatcity.com>


My preference is simply to have enough rollback, but you can have you cake and eat it too to some degree with some code like:

cursor c is ...
open c
loop
  begin
    for i in 1 .. 10000 loop

      fetch
      do stuff

    end loop
    commit
  exception when -1555 then
    close c;
    open c;
  end;
end loop;

the key thing is that your cursor must be "restartable", namely, there must be a trivial way of eliminating rows already processed.

But it will always be slower than simply having large rollback allocated..

hth
connor


Connor McDonald
http://www.oracledba.co.uk
http://www.oaktable.net

"GIVE a man a fish and he will eat for a day. But TEACH him how to fish, and...he will sit in a boat and drink beer all day"



Do You Yahoo!?
Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: =?iso-8859-1?q?Connor=20McDonald?=
  INET: hamcdc_at_yahoo.co.uk

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Nov 19 2002 - 03:11:57 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US