• Can you monitor execution plans (via extended events), get a plan from a fast execution and a plan from a slow execution?

    Can you monitor/record wait stats per query during its execution (poll sys.dm_os_waiting_tasks) or extended events and see what the query is waiting on when it executes fast and what it's waiting on when it executes slow?

    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