Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How can I quickly delete all records from a big table?
In article <8musft$3pn_at_netnews.hinet.net>,
"johnsonlu" <johnsonlu_at_ms30.url.com.tw> wrote:
> remember ,this table owner is you.because truncate command need table
> owner!!!
truncate table <tablename>;
works quite well if the table was created by the account attempting the truncate. Table owner is not necessary when one is truncating one's own tables.
> Jim Gregory ¼¶¼g©ó¤å³¹ <3992e06f$1_at_rpc1284.daytonoh.ncr.com>...
> >Disable the foreign key constraint between the child and parent table
then
> >truncate the parent table.
> >
> >HTH
> >
> >--
> >Jim Gregory
> >Principal Consultant for Keane, Inc.
> >Currently assigned to NCR
> >"Opinions are my own and do not reflect
> > those of Keane or my clients"
> >Cristian Veronesi <c.veronesi_at_crpa.it> wrote in message
> >news:39925E73.C1097102_at_crpa.it...
> >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)
> >
> >
>
>
-- David Fitzjarrell Oracle Certified DBA Sent via Deja.com http://www.deja.com/ Before you buy.Received on Thu Aug 10 2000 - 00:00:00 CDT