Deleting in a complicated data structure on SQL Server 2000

Tags:
Microsoft SQL Server 2000
SQL Server database
SQL Server tables
I have a complicated data structure on SQL Server 2000 which, at times can go four levels deep. It is all designed using foreign keys, as expected. I am having difficulty getting deletion to work from the top level, which is an orders table. Some child tables have cascade deletes on, and some are dealt with by native C# code. No matter what I try, it still takes upto fiveminutes to delete an order. Any ideas as to why?

Answer Wiki

Thanks. We'll let you know when a new response is added.

Sounds like you have some major locking going on in the system. While the delete is running look at the sp_who2 output and see if anyone is blocking your delete process.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • carlosdl
    Have you tried to run queries to select each of the rows that need to be deleted in all involved tables ? Maybe it is taking that long to delete the records because of the lack of appropriate indexes.
    69,475 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following