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: fastest way of deleting all rows in a table

Re: fastest way of deleting all rows in a table

From: Richard Foote <richard.foote_at_bigpond.com>
Date: Sat, 1 Mar 2003 01:18:42 +1000
Message-ID: <CVJ7a.57489$jM5.146218@newsfeeds.bigpond.com>


"Richard Foote" <richard.foote_at_bigpond.com> wrote in message news:DLJ7a.57481$jM5.145824_at_newsfeeds.bigpond.com...
> "ShravanaKumar" <shravanakumar.ks_at_siemens.com> wrote in message
> news:3E5F61AF.EDCB5E19_at_siemens.com...
> > Hi All,
> >
> > We are using Oracle 9i on Solaris 8.
> >
> > I would like to know, which is the fastest way of deleting all rows from
> > a table and why ?
> >
> > a. Truncate table .....
>
> Fastest, especially if you keep the existing storage
>
> > b. delete table .....
>
> Slowest
>
> > c. drop table .... ( an re-create the table afterwards )
>
> A close second but you will have to re-allocate the storage, re-grant any
> privileges, re-create indexes etc. etc. so if the intention was to simply
> repopulate with new data, that's what truncate was invested for.

Invested ?????

I'm going to bed ... Received on Fri Feb 28 2003 - 09:18:42 CST

Original text of this message

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