關於我

我的相片
用心思考、保持熱情,把工作上的經驗作分享與紀錄。希望能夠跟大家一起不斷的成長~

用Sql分析Profiler錄下之Trace資料

Script如下,參考~ SELECT top 5 substring(TextData,1,100) as SqlCmd, sum(Duration) as Duration, sum(Reads) as Reads, sum(Writes) as Writes, sum(cpu) as cpu, avg(Duration) as AvgDura FROM fn_trace_gettable('C:\Test\deadlock.trc', Default) where TextData is not null group by substring(TextData,1,100) order by AvgDura desc

沒有留言:

張貼留言