分析SQL语句的性能

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

set statistics time on
select * fromset statistics time off

结果:

 

2.查看查询对I/0的操作情况

set statistics io on
select * fromset statistics io off

结果:

扫描计数:索引或表扫描次数

逻辑读取:数据缓存中读取的页数

物理读取:从磁盘中读取的页数

预读:查询过程中,从磁盘放入缓存的页数

lob逻辑读取:从数据缓存中读取,image,text,ntext或大型数据的页数

lob物理读取:从磁盘中读取,image,text,ntext或大型数据的页数

lob预读:查询过程中,从磁盘放入缓存的image,text,ntext或大型数据的页数

转:https://www.cnblogs.com/knowledgesea/p/3686105.html

posted @ 2022-01-21 14:08  密蒙  阅读(128)  评论(0编辑  收藏  举报