• mtassin (2/4/2013)


    There is an option 4 on wait states (at least)

    1. Capture the wait stats every 15 minutes

    2. Store the current captured value into a staging table

    3. Calculate the differences in Wait Stats between the current capture and the previous one

    4. Store the differences

    5. Never clear wait stats at all. Instead add a job that runs at instance start up that clears the staging table and replaces the values in it with all zeros.

    Put those into a nice Tabular model in SQL 2012 or a Powerpivot in SQL 2008R2 and you can analyze with 15 minute rollups to half hours and hours. It's interesting to see your wait states across a given day.

    Hello Mark,

    Thanks for your suggestion of an option 4. I have a related question.

    I just found and ran some code to store my SQL Server's wait stats to a table. It logged 653 rows. Adding 653 rows every 15 minutes comes out, by my rough estimate, to 2,207,520 rows per year.

    Is that expected as far as you're concerned? I'd like to keep as much data as needed to be useful, but I am not sure all of those rows would be. And I want to know more before I start collecting the wait stats at that rate.

    Thanks for any help.

    - webrunner

    -------------------
    A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
    Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html