• dwilliscp (10/17/2013)


    FROM sys.dm_exec_requests er

    INNER JOIN sys.sysprocesses sp ON er.session_id = sp.spid

    Here is a potential problem. This join is good in most cases, but not if you use MARS (Multiple Active Result Sets) or SOAP requests, in which case there may be multiple requests for the same session id.

    If we ignore that, and assume that a single request is generating 700 worker threads, that is is excessive. You need to look into the query plan for that query, and investigate if you can add indexes or improve the query.

    There has been some other suggestions for diagnostic queries. I can offer beta_lockinfo, whicb you find at http://www.sommarskog.se/sqlutil/beta_lockinfo.html. This gives you both the query, the plan as well as a bunch of other information. And itjoins the various DMVs correctly. :--)

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]