-- clear stats globally on serverDBCCSQLPERF('sys.dm_os_wait_stats',CLEAR);-- {insert SQL to test here}-- Get lock wait statsSELECTwait_type,waiting_tasks_count,wait_time_ms,max_wait_time_msFROMsys.dm_os_wait_statsWHERE(waiting_tasks_count>0ORwait_time_ms>0ORmax_wait_time_ms>0)ANDwait_typeLIKE'%LCK%'ORDERBYwaiting_tasks_countDESC;
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.