This article is half-done without your Comment! *** Please share your thoughts via Comment ***
Whether you are SQL Database Developer or SQL Database Administrator, you must know about the sys.dm_os_wait_stats.
Most of the time, I found that SQL People don’t know about this sharing a short note on this.
SQL Server is recording all different types of wait counts and storing into sys.dm_os_wait_stats. The different types waits are Resource waits, Queue waits, External waits.
You can find information like, total CPU wait stats, total DISK wait stats and other different related stats.
Execute below query,
1 2 3 |
SELECT * FROM sys.dm_os_wait_stats ORDER BY wait_time_ms DESC |
Column information:
wait_type: the name of the wait type
waiting_tasks_count: the incremental counter of wait type. If a number is high, you must investigate a particular wait type
wait_time_ms: the total wait time for this wait type in milliseconds. This time is inclusive of signal_wait_time_ms
max_wait_time_ms: the maximum wait time on this wait type
signal_wait_time_ms: the wait time for a runnable thread and you can note high while running long queries.
Leave a Reply