DBCC DROPCLEANBUFFERS --清除缓冲区
DBCC FREEPROCCACHE --删除计划高速缓存中的元素
SET STATISTICS TIME ON
SET STATISTICS IO ON
SET STATISTICS PROFILE ON
-- 执行代码
SET STATISTICS TIME OFF
SET STATISTICS IO OFF
SET STATISTICS PROFILE OFF
GO
DBCC DROPCLEANBUFFERS --清除缓冲区
DBCC FREEPROCCACHE --删除计划高速缓存中的元素
SET STATISTICS TIME ON
SET STATISTICS IO ON
SET STATISTICS PROFILE ON
-- 执行代码
SET STATISTICS TIME OFF
SET STATISTICS IO OFF
SET STATISTICS PROFILE OFF
GO
转载于:https://www.cnblogs.com/challengesoflife/p/11571243.html