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
"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.
Depends what you what to do and why ...
Cheers
Richard Received on Fri Feb 28 2003 - 09:08:03 CST
![]() |
![]() |