sp_BlitzWho Does Not Complete Just trying out sp_BlitzWho for the first time.  On one specific server it never completes but continues to consume CPU, as observed via sp_whoisactive.

I have played with the SQL generated and isolated it down to the "blocked" outer apply.  If I comment out the WHERE clause in the "blocked" outer apply it completes.  Or if I only execute either of the conditions in the WHERE it completes.

WHERE (s.session_id = sys2.spid
   OR s.session_id = sys2.blocked)


I don't really know how to take this further.  I did consider 2 outer applies rather then the one with the OR in the WHERE.

I am running sp_BlitzWho Version = '5.2'; VersionDate = '20170406'.

As Brent pointed out, this is not the current version from GitHub.
Yeah, that's the older version. We released a new one a couple days ago that has a performance improvement for that query.

The join in the new code should look like this (as well as use a table variable (I know, I know), and also READ UNCOMMITTED):

WHERE (s.session_id = b.session_id
OR s.session_id = b.blocking_session_id)


The newer version should complete in roughly the same time as the lovely and talented sp_WhoIsActive.