SQL Server Performance Forum – Threads Archive
Delete from ??Hi i have problem with "Delete from" statement in sql server 2000. In particular table i have 2000 records. Now when i am issuing delete from statement in Query Analyzer to delete particular record from table, on server it is taking 36-50 seconds to delete. And from node it is taking almost 1 1/2 minutes. Is their any other method available to speed up Delete from statement.
I am using Sql server 2000.
Immediate reply will be appreciated. Tushar
Without seeing the statement, it’s almost impossible to tell. —
Microsoft SQL Server MVP
Heute schon gebloggt?http://www.insidesql.de/blogs
Ich unterstuetze PASS Deutschland e.V. http://www.sqlpass.de)
As Frank says hard to know without seeing the statement, but can you check if there are any foreign key constraints pointing to this table or if this table has any delete triggers? Cheers
If it’s taking that long to delete one of 2000 records, the first guess is that the table doesn’t have a Primary Key. If the whole server is slowing down, then you’re probably running very low on disk space. Look at the size of the log file of your database, and check the free space on the disk that holds the log file. Other than that, it depends … It could be that a delete trigger on this table has a design flaw.
It could be have you cascading deletes from this table, and your deletion will delete a large number of records in other tables as well.
And if those tables have delete triggers or cascading deletes too …………