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: Just Another User <zzz_at_zzz.zzz>
Date: Fri, 28 Feb 2003 18:07:34 GMT
Message-ID: <GzN7a.622560$HG.113431678@news4.srv.hcvlny.cv.net>

"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 .....

           Faster than delete. You may want to explore "reuse storage" along with truncate.

> b. delete table .....

         You can recover (rollback) from it (if you change your mind).

> c. drop table .... ( an re-create the table afterwards )

       Will make all stored procs invalid that depend on the table
>
> can some one shed light on this ?
>
> Thanks,
>
> Best Regards,
> Shravana Kumar.
>
>
>
Received on Fri Feb 28 2003 - 12:07:34 CST

Original text of this message

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