从上图可以看出,spid51 block了自己。这种情况有两个可能的原因:
1,When an SPID is waiting for an I/O page latch, you may notice that the blocked column briefly reports that the
SPID is blocking itself. This behavior is a side effect of the way that latches are used for I/O operations on data pages
对于这种原因,block的时间会非常短。上图不属于这种情况。下面的链接详细解释了这种情况的成因:
http://support.microsoft.com/kb/906344
2, 还有一个可能的原因是SQL Server运行query时的并发度设的太高。上图就是这种情况。这是sql server为了提高一个性能差的query时做的自动优化,即多线程并行的运行一个sql。出现这种情况说明sql的性能很差,需要优化。但一般也可以不用管它。
但有时会由于过高的并行导致死锁出现:intra-query parallel thread deadlocks。即由于并发度太高导致并行的线程间发生了死锁。
http://blogs.msdn.com/b/bartd/archive/2008/09/24/today-s-annoyingly-unwieldy-term-intra-query-parallel-thread-deadlocks.aspx