用SET STATISTICS TIME命令显示T-SQL语句执行时间
时间:2011-04-12 来源:Chen Aolin
下面的示例显示服务器的执行、分析和编译时间。
USE AdventureWorks; GO SET STATISTICS TIME ON GO SELECT * FROM Production.ProductCostHistory WHERE StandardCost < 500.00; GO SET STATISTICS TIME OFF; GO
下面是输出结果:
SQL Server parse and compile time:
CPU time = 0 ms, elapsed time = 1 ms.
SQL Server parse and compile time:
CPU time = 0 ms, elapsed time = 1 ms.
(269 row(s) affected)
SQL Server Execution Times:
CPU time = 0 ms, elapsed time = 2 ms.
SQL Server parse and compile time:
CPU time = 0 ms, elapsed time = 1 ms.
相关阅读 更多 +