0
votes
1answer
467 views

How to avoid locks by large transactions?

We have a large application running, that requires cleanup for performance reasons. This was however not forseen when designing the application. Basically, the delete is executed from a stored ...
2
votes
1answer
180 views

clustered and covering index ignored on delete statement. Table scan occurs

Why would SQL Server 2005 find it more efficient to perform a table scan instead of using the available clustered index on the primary key (and only the primary key)? DISCLAIMER: There is also a ...
2
votes
1answer
675 views

Delete rows in a table that has multiple FKs

I need to delete all the rows in the ContentData table that have the word 'DV95' in the htmldata column. Here is what I am using: BEGIN TRANSACTION DELETE Contentdata FROM Contentlinks INNER JOIN ...
5
votes
2answers
6k views

can I resolve a deadlock with the rowlock hint?

I have a large delete stored proc and I've reproduced a deadlock in a situation where the deletes would not have deleted anything. It looks like the part of the stored proc that hit a deadlock was ...