We're in the process of upgrading to SQL Server 2022. While comparing performance between our old QA server (SQL 2014) and our new QA server, we're using sp_whoisactive to help identify bottlenecks. While doing that, we often notice a session on the 2022 server that has a blocking_session_id of -5. Does anyone know what that means?
1 Answer
This is documented in the documentation by documenters: dm_exec_requests
-5 = session_id of the blocking latch owner couldn't be determined because it isn't tracked for this latch type (for example, for an SH latch).
By itself, blocking_session_id -5 doesn't indicate a performance problem. -5 is an indication that the session is waiting on an asynchronous action to complete. Before -5 was introduced, the same session would have shown blocking_session_id 0, even though it was still in a wait state.
Depending on workload, observing blocking_session_id = -5 may be a common occurrence.