SQL SERVER View SQL statement IO, time, index consumption

1. View SQL statement IO consumption

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 view SQL statement IO, time, index consumption - bitter rain - my blog
 

 2. View the time consumption of the SQL statement

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 view SQL statement IO, time, index consumption - bitter rain - my blog
 

 3. View SQL statement index consumption

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 view SQL statement IO, time, index consumption - bitter rain - my blog

 The red box in this image above can see that this query went through a clustered index scan

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324688200&siteId=291194637