SQL SERVER 查看SQL語句IO,時間,索引消耗


1.查看SQL語句IO消耗

set statistics io on 
    select * from dbo.jx_order where order_time>'2011-04-12 12:49:57.580' 
set statistics io off

 

SQL SERVER 查看SQL語句IO,時間,索引消耗 - 苦雨 - 我的博客
 

 2.查看SQL語句時間消耗

set statistics time on 
     select * from dbo.jx_order where order_time>'2011-04-12 12:49:57.580' 
set statistics time off

SQL SERVER 查看SQL語句IO,時間,索引消耗 - 苦雨 - 我的博客
 

 3.查看SQL語句索引消耗

set statistics profile on 
       select * from dbo.jx_order
       where order_time>'2011-04-12 12:49:57.580' 
set statistics profile off

SQL SERVER 查看SQL語句IO,時間,索引消耗 - 苦雨 - 我的博客

 此上圖中的紅框可以看到此查詢走了聚集索引掃描


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM