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: how to delete parts of data of a very large table quickly?

Re: how to delete parts of data of a very large table quickly?

From: Rob Cowell <rjc4687_at_hotmail.com>
Date: Thu, 24 Apr 2003 08:56:01 +0100
Message-ID: <3EA79891.389BE85B@hotmail.com>


Umm. Rather than create a table, insert rows, truncate original table, put rows back and then get rid of temp table, you'd be much better off using CREATE TABLE AS SELECT (NO LOGGING / PARALLEL - but understand the implications of both) to build a new table containing just the rows you want. Drop the original table and rename the new one to the original name.

I'm pretty sure a non APPENDing insert will generate just as much rollback as a DELETE.
As I understand it, CREATE TABLE AS SELECT creates minimal if any rollabck.

Phillip wrote:
>
> the best way may be to create a temporary table and insert the rows you want
> saved from this table into the temporary table. Then truncate the original
> table, and reinsert the rows from the temporary table. The 'truncate' command
> will bypass any redo activity and will be much faster than a normal delete.
> Also keep in mind that there's no rollback from a truncate, so if you execute
> this command, make sure that this is what you want.
>
> zhangguoping_at_boco.com.cn wrote:
>
> > i have a very large table, i want to delete some data. The data to be
> > deleted is also very large. i am afraid rollback segment may suffer from it.
>
> --
> Phillip
Received on Thu Apr 24 2003 - 02:56:01 CDT

Original text of this message

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