728x90
반응형
Windows Perfmon이나, Active Monitor에서 Disk IO를 확인하지 못하고 있을때 대안책입니다.
SELECT DB_NAME(fs.database_id) AS [Database Name] ,
mf.physical_name ,
io_stall_read_ms ,
num_of_reads ,
CAST(io_stall_read_ms / ( 1.0 + num_of_reads )
AS NUMERIC(10, 1))
AS [avg_read_stall_ms] ,
io_stall_write_ms ,
num_of_writes ,
CAST(io_stall_write_ms / ( 1.0 + num_of_writes )
AS NUMERIC(10, 1))
AS [avg_write_stall_ms] ,
io_stall_read_ms + io_stall_write_ms AS [io_stalls] ,
num_of_reads + num_of_writes AS [total_io] ,
CAST(( io_stall_read_ms + io_stall_write_ms ) /
( 1.0 + num_of_reads+ num_of_writes )
AS NUMERIC(10,1))
AS [avg_io_stall_ms]
FROM sys.dm_io_virtual_file_stats(NULL, NULL) AS fs
INNER JOIN sys.master_files AS mf WITH ( NOLOCK )
ON fs.database_id = mf.database_id
AND fs.[file_id] = mf.[file_id]
WHERE DB_NAME(fs.database_id)='PBW'
ORDER BY avg_io_stall_ms DESC
728x90
반응형
'운영 > 성능 및 실행계획' 카테고리의 다른 글
Buffer cache hit ratio 수집 (0) | 2014.01.24 |
---|---|
MS SQL에서 CPU 사용율 확인 (0) | 2014.01.23 |
캐쉬된 실행 계획 보기(Investigating the plan cache) (0) | 2013.12.01 |
성능 카운터 정보를 DB에 저장하기 (0) | 2013.12.01 |
I/O 비용, 실행 빈도, 블로킹, Recompiled, 누락된 인덱스 조회 쿼리 (0) | 2013.11.27 |