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

Home -> Community -> Usenet -> c.d.o.server -> Re: delete data from table without rollback/logging?

Re: delete data from table without rollback/logging?

From: Ronald <devnull_at_ronr.nl>
Date: 5 Oct 2001 07:54:25 -0700
Message-ID: <67ce88e7.0110050654.689be97e@posting.google.com>


Steve Salvemini <steve.salvemini_at_adelaide.edu.au> wrote in message news:<3BBD190B.D3B36442_at_adelaide.edu.au>...
> Hi group, I'm running a cut down script on a copy of a live database to
> remove some 90%
> of the data.
>
> Currently I use delete statements to remove the data from 100's of
> tables.
> Another method I can use is to copy out 10% into a temp table, truncate
> the original and
> then copy the 10% back in, reducing the hit on the rollback segments.
>
>
> Regardless of which option I take, is there a faster option to delete
> and insert data without filling up the rollback segments.

copy the 10% to a table using 'insert /*+append*/ into x as select * from y', 'truncate table y'
and 'insert /*+append*/ into y select * from x'

is the fastest way to do this. Don't forget it creates 'holes' in the redolog files. Normally it is better to take a backup after this process is ready since a rollforward from the previous backup will and up with empty tables ...
(assuming >= oracle 8i)

Ronald.



http://ronr.nl/unix-dba Received on Fri Oct 05 2001 - 09:54:25 CDT

Original text of this message

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