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

Home -> Community -> Usenet -> comp.databases.oracle -> Array selection and update.

Array selection and update.

From: Mark A Framness <farmer_at_netnet.net>
Date: 29 Apr 2004 15:11:15 -0700
Message-ID: <8168768c.0404291411.31ac17f2@posting.google.com>


Greetings,

I am working on a project and we need to write a conversion script to initialize a new field on a table. The number of records on this table is on the order of millions so routine selection and update takes a long time.

I am tasked with writing a pl/sql proc that utilizes array processing to update the column.

Since all of the fields I am going to update are null, does it pay to create a array-based select prior to updating? I was thinking of array-selecting and then array updating 5000 at a crack. Or should I just write a single update statement? Does the former approach (think F-former F-first) perhaps give us the ability to commit where the later (l-later l-last) does not?

What I have tried to do is bulk select the key fields into appropriate arrays, I then bind those arrays to the update fields. Then I call the update statement. These steps are performed in a while loop until the number of records retrieved is less than the the max number to fetch/pass.

If you have a small little example of what I am trying to do, please post it.

Thank You
}\/{ark Received on Thu Apr 29 2004 - 17:11:15 CDT

Original text of this message

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