Share via

Wait types

DH 1 Reputation point
2020-09-25T17:07:02.973+00:00

I know on the SSMS screen, in the Processes, i can see the WAIT TYPE.
Is there a query that can be run to see what were the wait types throughout a day, the application that had it, and the wait time?

SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories

0 comments No comments

2 answers

Sort by: Most helpful
  1. AmeliaGu-MSFT 14,016 Reputation points Microsoft External Staff
    2020-09-28T06:41:33.17+00:00

    Hi @DH ,

    In addition, please refer to Capturing wait statistics for a period of time which might help.

    Best Regards,
    Amelia


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?

    0 comments No comments

  2. Erland Sommarskog 134.7K Reputation points MVP Volunteer Moderator
    2020-09-25T21:39:36.487+00:00

    See https://www.sqlskills.com/blogs/glenn/sql-server-diagnostic-information-queries-detailed-day-14/ for a query.

    An important part is that the query filters out a lot system waits you should ignore. The post is a few years old and may have to be updated for newer releases for more waits to ignore.

    Note that Glenn's query gives you the accumulated waits since SQL Server started (or the DMV was cleared). I prefer to sample it every 10-20 minutes, so that I can see what happened at specific intervals.

    The waits are over the entire server. SQL Server does not what applications that are connecting, so it cannot track per application.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.