获取sql执行时间方法2
--清除缓存 CHECKPOINT; DBCC DROPCLEANBUFFERS; DBCC FREEPROCCACHE; DBCC FREESYSTEMCACHE ('ALL'); GO SET STATISTICS TIME ON; GO SELECT top 200 * from table GO SET STATISTICS TIME OFF; GO
获取sql执行时间方法2
--清除缓存 CHECKPOINT; DBCC DROPCLEANBUFFERS; DBCC FREEPROCCACHE; DBCC FREESYSTEMCACHE ('ALL'); GO SET STATISTICS TIME ON; GO SELECT top 200 * from table GO SET STATISTICS TIME OFF; GO