-- Robert Hicks <[EMAIL PROTECTED]>

> Steven Lembark wrote:
>> 
>> -- Robert Hicks <[EMAIL PROTECTED]>
>> 
>>> I have been handed a couple of requests to change some data. One is an
>>> update on 3.6 million records and the other is two different deletions
>>> of over 16 million rows of data. I need to be able to do these in
>>> batches as I am told that Oracle will "blow up" if I do them in one
>>> shot.
>> 
>> The issue is rollback/redo space. If you have too large 
>> of a transaction pending you can run out of space and 
>> it abort the transaction. You may have sufficient space
>> to blow off this many records, but it'll be a True Pain
>> to find out the hard way...
>>  
> 
> The limit...10,000 and he had to increase the rollback space or some such
> to get it to work right.

One approach is to select the keys to be updated into a 
temporary table, then update the scratch table with new
values, use a join to udpate the records with a count < x
or rowid < x on the scrath space. After the update succeeds 
you update a "finished" flag.

This also has the advantage of bookkeping what was done.
Depending on how important the data is you might want to
select the existing records into scratch space, update 
the scratch records with 'new value' fields and use a
nested select to udpate the new table records. Net result
is a running history of what was updated when with the 
old and new values selectable.


-- 
Steven Lembark                                       85-09 90th Street
Workhorse Computing                                Woodhaven, NY 11421
[EMAIL PROTECTED]                                     1 888 359 3508

Reply via email to