DBCC DROPCLEANBUFFERS
DBCC FREEPROCCACHE
SET STATISTICS IO ON;
SET STATISTICS TIME ON;
http://www.cnblogs.com/hyqiang168/archive/2008/01/19/1045616.html
1.测试前用二条命令清除SQL Server的数据和过程缓冲区,以保证测试条件相同:
DBCC DROPCLEANBUFFERS和DBCC FREEPROCCACHE
2.SET STATISTICS TIME:看cpu时间
3.SET STATISTICS IO:关注scan count(计数)------查询读取的表数量 logical read( 逻辑读)次数
沒有留言:
張貼留言