Reading SQL deadlock graph
Can someone please help me to read/understand this deadlock graph?
I don't understand why process 75 is requesting a lock on an object that he has a lock on already?
开发者_开发技巧According to a blog article that I've found the existance of an "Exchange Event" indicates that the source of your problem may be parallelism in your query.
Today's Annoyingly-Unwieldy Term: "Intra-Query Parallel Thread Deadlocks"
The above article goes into much more detail, however the punchline is:
Workaround #1: Add an index or improve the query to eliminate the need for parallelism. In most cases, the use of parallelism in a query indicates that you have a very large scan, sort, or join that isn't supported by proper indexes. If you tune the query, you will often find that you end up with a much quicker and more efficient plan that doesn't use parallelism, and therefore isn't subject to this type of problem. Of course, in some queries (DSS/OLAP-type queries, in particular) it may be difficult to eliminate all large scans.
Workaround #2: Force single-threaded execution with an "OPTION (MAXDOP 1)" query hint at the end of the query. If you can't modify the query, you can apply the hint to any query with a plan guide.
You might want to try this to see if there is any improvement.
精彩评论