Wait Stats

Here’s my favorite links for performance tuning SQL Server with wait stats:

Introductions to Wait Stats

Explanations of Each Wait Type

Tools to Analyze Waits and Queues

  • sp_WhoIsActive from Adam Machanic – this awesome free replacement for sp_who shows you what’s REALLY happening inside your database server including the queries, wait statistics, and locking/blocking issues.  Call it with @get_plans = 1 to see execution plans, too!
  • SQLNexus – when you want to analyze performance over time, use this free tool from Microsoft to generate pretty graphs of your SQL Server’s activity.  Not for the faint of heart, but we discuss it in detail in chapter 13 of our book, Professional SQL Server 2008 Internals and Troubleshooting.
3 Responses to Wait Stats
  1. [...] Brent Ozar PLF Wait Stats Goldmine of Golden Goodness [...]

  2. Amanda
    October 10, 2011 | 12:58 PM

    Hi, Brent –
    I’m using a proc which i run at the top of every hour to see how much i/o is happening within a 10 minute time frame. Naturally, it uses a WAITFOR during that 10 minutes.
    What I’m wondering is if it can be causing any blocking issues. My understanding is that it just locks up that one thread for the duration, not blocking anything. I just want to verify that. It’s essentially reading the dmvs at two different times, and then processing the results.

    • Brent Ozar
      October 11, 2011 | 7:24 AM

      Amanda – if you’re *only* querying DMVs and nothing else, then you’re fine. I get nervous when I see people do it with any other tables or transactions, because they can definitely end up locking and blocking.

Leave a Reply

Wanting to leave an <em>phasis on your comment?

Notify me of followup comments via e-mail. You can also subscribe without commenting.