1. 查看执行时间和cpu占用时间:

    set statistics time on
    select * from dbo.表名
    set statistics time off
    
  2. 查看查询对I/0的操作情况:

    set statistics io on
    select * from dbo.表名
    set statistics io off
    

    扫描计数:索引或表扫描次数
    逻辑读取:数据缓存中读取的页数
    物理读取:从磁盘中读取的页数
    预读:查询过程中,从磁盘放入缓存的页数
    lob逻辑读取:从数据缓存中读取,image,text,ntext或大型数据的页数
    lob物理读取:从磁盘中读取,image,text,ntext或大型数据的页数
    lob预读:查询过程中,从磁盘放入缓存的image,text,ntext或大型数据的页数

本文内容来自网络信息汇总

更多推荐

SQL Server查看语句执行情况