Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 delete from myTable takes 10 minutes

Author  Topic 

rtutus
Aged Yak Warrior

522 Posts

Posted - 2007-10-05 : 09:01:38
Is it normal that delete all rows in a table of 1.5 million rows takes 10 minutes?
Do you find that normal and acceptable or does that mean there is something wrong in our server?

Thanks.

X002548
Not Just a Number

15586 Posts

Posted - 2007-10-05 : 09:23:47
TRUNCAT TABLE myTable99

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2007-10-05 : 10:00:02
delete is slower the truncate because of the logging involved.

http://weblogs.sqlteam.com/mladenp/archive/2007/10/03/SQL-Server-Why-is-TRUNCATE-TABLE-a-DDL-and-not.aspx


elsasoft.org
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-10-05 : 11:25:29
"Is it normal that delete all rows in a table of 1.5 million rows takes 10 minutes?"

Probably, yes.

"Do you find that normal and acceptable or does that mean there is something wrong in our server?"

To me it means that you should program this differently not to put an ATOMIC transaction on a delete that is so large.
Go to Top of Page

rtutus
Aged Yak Warrior

522 Posts

Posted - 2007-10-05 : 11:34:26
Thanks.
Go to Top of Page
   

- Advertisement -