SQL SERVER – Finding Latch Statistics

Last month I wrote SQL Server Wait Types and Queues series SQL SERVER – Summary of Month – Wait Type – Day 28 of 28. I had great fun to write the series. I learned a lot and I felt this has created some deep interest on the subject with others.

I recently received very interesting question from one of the reader after reading SQL SERVER – PAGELATCH_DT, PAGELATCH_EX, PAGELATCH_KP, PAGELATCH_SH, PAGELATCH_UP – Wait Type – Day 12 of 28 that if they can know what kind of latches are waiting and what is their count.

Absolutely! SQL Server team has already provided DMV which does the same.

-- Latch
FROM sys.dm_os_latch_stats
ORDER BY wait_time_ms DESC

Above script will return you details about how many latches were waiting for how long.

SQL SERVER - Finding Latch Statistics latchdetails

After going over this script I feel like going deep into the subject further. I will post a blog post on the subject soon.

Reference: Pinal Dave (https://blog.sqlauthority.com)

Previous Post
SQL SERVER – Sharing your ETL Resources Across Applications with Ease
Next Post
SQLAuthority News – Download – Microsoft SQL Server Compact 4.0

Related Posts

No results found.

Leave a Reply