February 20, 2017 at 6:32 pm
Can you please help me explain this dead lock graph? I'm novice in reading this graph. I'm pretty sure SELECT and UPDATE are interfering each other. Developer thinks he's issuing UPDATE after SELECT so, they shouldn't interfere each other. I looked at the StartTime and EndTime of the batch of both of the processes and I don't see overlap. How do I explain to the developer what is happening or how the deadlock happened?
Any help would be appreciated. It didn't let me attach .xdl file so I put xml into .txt file.
February 21, 2017 at 5:10 am
The main problem with reading deadlock graphs is that they are incomplete. The batch that contains the UPDATE statement has another 159 lines of code in it. The deadlock victim is itself starting on line 2, so there's more code there as well. To fully understand what's happening with a deadlock you usually need all the statements involved, each batch, complete. Then you can determine why there are mixed locks leading to a deadlock situation.
As far as overlap, one transaction started at 4:18.887 and the other at 4.18.947. It's pretty likely that the chosen victim is overlapping there with the winner of the deadlock.
Without the full batch, it's going to be very hard to tell you specifically why the deadlock is occurring.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply