Reputation: 33
I've a table in sql server 2005 with a chaild table that has millions of records in it. Whenever I issue a delete command even with a where clause, it takes abnormally long to execute it. Is it bacause the size of the child table that is causing this delay? What are the ways to make the delete query faster?
thanks, sweta.
Upvotes: 3
Views: 598
Reputation: 432421
The usual suspects:
Also:
Edit, after comments: You need indexes...
Upvotes: 3
Reputation: 3655
It sounds like it may be doing a table scan on the child table. Make sure that the joining column has an index on the child table.
Upvotes: 2