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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Delete fast

Re: Delete fast

From: Geoff Muldoon <geoff.muldoon_at_trap.gmail.com>
Date: Wed, 28 Jun 2006 09:23:44 +1000
Message-ID: <MPG.1f0c690eaaeff61a989817@news.readfreenews.net>


mccmx_at_hotmail.com says...

> Do you have indexes on that table...? try temporarily dropping the
> indexes. This should drastically decrease the amount of rollback data
> that is generated and therefore the redo that goes with it.

Rather than dropping them:

cursor my_indexes is

    select INDEX_NAME
    from USER_INDEXES
    where TABLE_NAME = <table name>;
for mi in my_indexes loop

    execute immediate 'alter index '||mi.index_name||' unusable'; end loop;
execute immediate 'alter session set skip_unusable_indexes = true'; ... do the deleting ...
for mi in my_indexes loop

    execute immediate 'alter index '||mi.index_name||' rebuild'; end loop;
execute immediate 'alter session set skip_unusable_indexes = false';

Geoff M Received on Tue Jun 27 2006 - 18:23:44 CDT

Original text of this message

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