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: for d in c loop; insert; commit ...

Re: for d in c loop; insert; commit ...

From: Jared Still <jkstill_at_gmail.com>
Date: Wed, 15 Aug 2007 17:06:33 -0700
Message-ID: <bf46380708151706x957aeeepfcbf4b08a5413c53@mail.gmail.com>


On 8/15/07, stv <stvsmth_at_gmail.com> wrote:
>
> Why in the world did I inherit a database with all this nonsense
> everywhere ...
>
> lc := 0;
> For d in C loop
> lc := lc + 1;
> # insert stuff
> if mod(lc, 50) = 0 then commit; end if;
> end loop;
> commit;
>
>

Yes, that's not really necessary.

I will admit to having done that in the past however.

IIRC that was on 7.0.16, so there may have been somewhat of a legitimate reason for doing so. That was a long time ago and I can't remember. I was also younger, dumber and less educated. ;) ..
Just saw the latest update to this thread.

Version 6 eh? There may have been a good reason for the periodic commit.

If there ever was a need to do this, it's disappeared with later versions.

INSERT in particular doesn't have any need for this.

Here's your chance to make some performance improvements in the code.

-- 
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Aug 15 2007 - 19:06:33 CDT

Original text of this message

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