DEFINITIONS

Definitions More Info.
Definition ID920
TitleSQL
CategoryNOTES
DefinitionCPU Bottleneck yapan sorgular
Definition DescriptionKaynak: Microsoft Sql server Perfomance Tunning


You can detect a CPU resource bottleneck by checking if the SİGNAL WAİT TİME from the
sys.dm_os_wait_stats DMV indicates greater than 25 percent of the TOTAL WAİT TİME.

Yukarıdaki açıklamay göre sorguyu ben yazdım. Ve Bottlenecke olan sorguları anlık olarak yakalayabiliryorsun.

SELECT (t.wait_time_ms/100) AS [wait_time_%]
,t.signal_wait_time_ms
,r.sql_handle
,st.text
,CASE
WHEN t.signal_wait_time_ms > (t.wait_time_ms/100) then 'CPU BOTTLENECK VAR'
ELSE '--'
END AS BOTTLENECKSTATUS
FROM sys.dm_os_wait_stats t
join sys.dm_exec_requests as r on t.wait_type=r.wait_type
cross apply sys.dm_exec_sql_text(r.sql_handle) as st
RecordBycunay
Record Date11-03-2019 21:32:01
Düzenle
Kopyala
Sil