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: Delete rows is slow

Re: Delete rows is slow

From: Susan Wilson <susanw_at_phx.mcd.mot.com>
Date: Thu, 19 Nov 1998 17:31:19 -0700
Message-ID: <3654B857.FEB12B7B@phx.mcd.mot.com>


If you're really doing 'delete *' all the time, use the truncate command instead. Delete will attempt to rebuild indexes, maintain referential intergrity, etc ... a lot of overhead. Delete also tracks the entire transaction so that if you change your mind you can issue a 'rollback' and recover from the delete. Delete will not change the high water mark on the table, either, so that next time you insert it will take a long time too.

Truncate simply empties the table of all rows, and does not allow rollback. It maintains the table definition, though, and is typically very fast.

Loy&Hutz wrote:
>
> Hello everybody !
>
> I am new in Oracle world and have this problem:
>
> My test server (NT4.0 Server - Oracle 8.0.4-Server with Pentium 200 and
> only 64 MB RAM) needs very long for deleting rows.
>
> e.g.: Delete * from Tab1 (30000 rows, 200 Cols) needs arround 15 minutes.
>
> all that time the server has disk access.
>
> is it a ram problem ? is the server always swapping pages ? Task manager
> says 90MB RAM in use.
>
> Thanks
>
> Sven

--

    Thanks.

    Engineering System Administration
    Motorola Computer Group
    602-438-3765
    mailto:susan_wilson_at_phx.mcd.mot.com     http://www.eng.mcd.mot.com/ Received on Thu Nov 19 1998 - 18:31:19 CST

Original text of this message

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