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 -> How can I quickly delete all records from a big table?

How can I quickly delete all records from a big table?

From: Cristian Veronesi <c.veronesi_at_crpa.it>
Date: 2000/08/10
Message-ID: <39925E73.C1097102@crpa.it>#1/1

What is the quickest way to empty a big table (200000 records) without encountering rollback segment problems? TRUNCATE TABLE does not work because the table has children (but the children are empty!!!). I made a PL/SQL script like this :

begin
  for rec in (
    select pkey from bigtable
  ) loop
    delete from bigtable where pkey = rec.pkey ;     commit ;
  end loop ;
end ;

... but it is very slow and it slows down my system too.

Any suggestion?
TIA, Cris

-- 

Cristian Veronesi ><(((( > http://www.crpa.it

Tzadikin, tzadikin geyen bom / Reshoyim, reshoyim falen bom
("just people will go ahead, evil people will fall" - yiddish song)
Received on Thu Aug 10 2000 - 00:00:00 CDT

Original text of this message

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