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: Kerber, Andrew W. <Andrew.Kerber_at_umb.com>
Date: Thu, 16 Aug 2007 07:38:07 -0500
Message-ID: <D40740337A3B524FA81DB598D2D7EBB3097A88DC@x6009a.umb.corp.umb.com>


I suppose its possible there were other issues. Maybe the some part of the system was unstable and they didn't want to lose a lot of data in case it failed? Or the data wasn't very clean, and they didn't want to have to start over if they had one bad piece of data they had to manually fix out of several thousand?

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Joel.Patterson_at_crowley.com
Sent: Thursday, August 16, 2007 7:16 AM
To: stvsmth_at_gmail.com; oracle-l_at_freelists.org Subject: RE: for d in c loop; insert; commit ...

I think that 'back then' the developers where trying to avoid the snapshot to old error... even if it had to begin over, some of it would be committed already.... (I'm just the messenger).

When inserting... it appears that 'old' habit has infiltrated every peace of code... perhaps to the point where they forgot why they did the committing in the first place, inside a loop.... let alone use the mod function, so now all DML commits every 50 rows... (only 50 rows? Wholly mollie).

Joel Patterson
Database Administrator
joel.patterson_at_crowley.com
x72546
904 727-2546

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of stv Sent: Wednesday, August 15, 2007 7:01 PM To: oracle-l_at_freelists.org
Subject: Re: for d in c loop; insert; commit ...

Ooops. Forgot to mention this is an old database (probably started with version 6) with some major work done when they moved to 8i on Solaris. Currently running 9.2.0.8 on Linux x86_64. Perhaps this made sense in an older version?

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;

--
http://www.freelists.org/webpage/oracle-l


--
http://www.freelists.org/webpage/oracle-l



------------------------------------------------------------------------------
NOTICE:  This electronic mail message and any attached files are confidential.  The information is exclusively for the use of the individual or entity intended as the recipient.  If you are not the intended recipient, any use, copying, printing, reviewing, retention, disclosure, distribution or forwarding of the message or any attached file is not authorized and is strictly prohibited.  If you have received this electronic mail message in error, please advise the sender by reply electronic mail immediately and permanently delete the original transmission, any attachments and any copies of this message from your computer system. Thank you.

==============================================================================

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Aug 16 2007 - 07:38:07 CDT

Original text of this message

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