2009. 11. 4. 13:45

Admin::TF 1118 사용 이유

http://www.sqlskills.com/BLOGS/PAUL/post/Misconceptions-around-TF-1118.aspx

 

익스텐트 공간 할당  참고

http://ceusee.textcube.com/23

 

-- HIGH CPU *******
-- Isolate top waits for server instance
;WITH Waits AS
(
SELECT
wait_type,
wait_time_ms / 1000. AS wait_time_s,
100. * wait_time_ms / SUM(wait_time_ms) OVER() AS pct,
ROW_NUMBER() OVER(ORDER BY wait_time_ms DESC) AS rn
FROM sys.dm_os_wait_stats
WHERE wait_type NOT LIKE '%SLEEP%'
)

SELECT
W1.wait_type,
CAST(W1.wait_time_s AS DECIMAL(12, 2)) AS wait_time_s,
CAST(W1.pct AS DECIMAL(12, 2)) AS pct,
CAST(SUM(W2.pct) AS DECIMAL(12, 2)) AS running_pct
FROM Waits AS W1
INNER JOIN Waits AS W2
ON W2.rn <= W1.rn
GROUP BY W1.rn, W1.wait_type, W1.wait_time_s, W1.pct
HAVING SUM(W2.pct) - W1.pct < 100 -- percentage threshold
ORDER BY W1.rn

'Trace Flag' 카테고리의 다른 글

최소로그 Flag -T610  (0) 2011.10.13
Admin::SQL Server Trace Flags  (0) 2010.06.07
Trace Flag  (0) 2010.06.04