Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: fastest way of deleting all rows in a table
"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