I had an interesting issue today when a colleague was running a long running IO intensive query. I ran sp_who2
to view the activity and saw that the query was running multi-threaded, but was blocked by a SPID of -5.
Yes, that’s SPID minus five, or negative five. (putting this here so that google searches maybe work?).
Google not working
I tried to use Google to get information on this but it seems that Google doesn’t allow you to search for negative numbers. So searching for SPID -5
doesn’t show any decent information to understand what’s going on.
As a last resort, I posted to Twitter.
So what's SPID -5 all about then? I swear I saw this recently but my Googling is not showing anything. #sqlhelp pic.twitter.com/Rr6EhM8uWT
— Mark Allison (@dataguzzle) February 21, 2022
I got some great responses and will let you navigate to the tweet or click on the links below. Mostly importantly, the links below describe the following.
By itself, blocking_session_id -5 does not indicate a performance problem. -5 is an indication that the session is waiting on an asynchronous action to complete.
References
How can I search Google for a negative number?
Negative Blocking Session Ids (-5 = Latch ANY TASK RELEASOR)
sys.dm_exec_requests (Transact-SQL)
real PITA there is no way to narrow a google search to -5.
— L_ N___ (@sqL_handLe) February 21, 2022
Raw -5 will exclude 5... and a search including "-5" will return results for the string '5'.https://t.co/vuVAcpQwwQ