Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 WAIT STATS

Author  Topic 

TRACEYSQL
Aged Yak Warrior

594 Posts

Posted - 2009-06-03 : 16:21:50
SELECT [wait_type], [waiting_tasks_count], [wait_time_ms], [max_wait_time_ms], [signal_wait_time_ms], GETDATE()
FROM sys.dm_os_wait_stats

In order to get this into a table to measure each day for viewing.
Is it best to run this and clear them out at midnight so each day is new.

DBCC SQLPERF([sys.dm_os_wait_stats],clear) WITH no_infomsgs

Just curious how any one else is doing this logging.

dinakar
Master Smack Fu Yak Hacker

2507 Posts

Posted - 2009-06-03 : 16:25:24
insert them into a user table on a daily basis.. you can purge them on a weekly basis or more frequently depending on how often you are collecting this info...
having a history always helps to identify patterrns.. so I wouldnt start the purging process until I see some pattern.

Dinakar Nethi
************************
Life is short. Enjoy it.
************************
http://weblogs.sqlteam.com/dinakar/
Go to Top of Page
   

- Advertisement -