SQL Server Latches and their indication of performance issues

前端 未结 4 1305
旧时难觅i
旧时难觅i 2021-02-02 00:08

I am trying to understand a potential performance issue with our database (SQL 2008) and in particular one performance counter, SQLServer:Latches\\Total Latch Wait Time Total La

4条回答
  •  余生分开走
    2021-02-02 00:23

    Reference taken from this blog:

    Using sys.dm_db_index_operational_stats:

    SELECT 
        OBJECT_NAME(object_id)
        ,page_latch_wait_count
        ,page_latch_wait_in_ms
        ,tree_page_latch_wait_count
        ,tree_page_latch_wait_in_ms  
        ,Page_io_latch_wait_count
        ,Page_io_latch_wait_in_ms
    FROM sys.dm_db_index_operational_stats (DB_ID(), NULL, NULL, NULL)
    

    Using sys.dm_os_latch_stats:

    SELECT * FROM sys.dm_os_latch_stats  
    WHERE latch_class = 'buffer'
    

提交回复
热议问题