Sunday, March 11, 2012

Cascading Delete

I use cascading delete on my SQL Server Database. I am experiencing a
long query time on my highest level delete, 10 minutes. If I delete
from each table manually and then delete the parent, I will usually be
done in less than a minute. Any suggestions?Doug Serie (dserie@.charter.net) writes:
> I use cascading delete on my SQL Server Database. I am experiencing a
> long query time on my highest level delete, 10 minutes. If I delete
> from each table manually and then delete the parent, I will usually be
> done in less than a minute. Any suggestions?

Did you implement the cascading delete by triggers or by referential
integrity?

In either case, care to share the relevant code and table definitions,
including indexes?

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

No comments:

Post a Comment