Developing Matt

My Technical Journal

Wait Stats

with one comment

When a reqeust is made to sql server that isn’t immediately served a wait state occurs.  Sql Server tracks these waits for your viewing pleasure.  Query the following:

select * from sys.dm_os_wait_stats
order by wait_time_ms desc

wait_type is the name of the wait type.   (click here for explanations)
waiting_tasks_count: count of times it occurred
wiat_time_ms: total time in milliseconds
max_wait_time_ms: the maximum time this wait occurred
signal_wait_time: difference between when it started and when it ended

This gives you a good snapshot of what is going on and what is dragging your server through the mud.  It’s a starting point for what to fine-tune.

Advertisements

Written by matt

February 4, 2008 at 8:37 am

One Response

Subscribe to comments with RSS.

  1. What have you found out by using this?

    wadewalker

    February 8, 2008 at 2:13 pm


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: