SQL Server "Long running transaction" performance counter: why no workee?
- by Sleepless
Please explain to me the following observation:
I have the following piece of T-SQL code that I run from SSMS:
BEGIN TRAN
SELECT COUNT (*)
FROM m
WHERE m.[x] = 123456
or m.[y] IN (SELECT f.x FROM f)
SELECT COUNT (*)
FROM m
WHERE m.[x] = 123456
or m.[y] IN (SELECT f.x FROM f)
COMMIT TRAN
The query takes about twenty seconds to run. I have…