• PearlJammer1 (11/15/2013)


    Am i right in answering your question as the first login that takes 50ms - As this will be present in the dmvs because it doesn't disconnect.

    The one that spends 50 ms of CPU time every 5 minutes is the one you'll see when querying the DMVs, the one that spends 200ms of CPU time every minute is by far a bigger problem and you'll only see it in the DMV if you query right as the it's running and even then you'll only see it's current CPU usage, not total over all time.

    So are you suggesting spwhoisactive is not the best way to see what queries could be causing the issue

    It's fine for seeing if there's a CPU-hogging query running right now. Not so much for getting a complete picture of what is and has been running.

    You can use the DMVs, but then you will need to poll then frequently, store the results somewhere and run analysis on those stored results.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass