데이터베이스/MSSQL
2013. 11. 20.
CPU 부하 쿼리 찾아내기
SELECT TOP 10 REPLACE(CONVERT(VARCHAR(20), CONVERT(MONEY,qs.total_worker_time / qs.execution_count/1000),1),'.00','') as [Avg CPU Time(ms)] ,qs.execution_count ,substring (qt.text, qs.statement_start_offset/2+1, (case when qs.statement_end_offset = -1 then len (convert (nvarchar(max), qt.text)) * 2 else qs.statement_end_offset end - qs.statement_start_offset)/2) as query_text ,qt.dbid ,sd.name ,..