我有一个查询,我在两个等效数据库上运行,但托管在单独的 MS SQL 2005 服务器上。我想测量两台服务器上查询的时间,因此尝试了以下操作:
SET STATISTICS TIME ON
GO
SELECT TOP 10000 *
FROM table
GO
SET STATISTICS TIME OFF;
GO
并得到以下结果:
SQL Server parse and compile time:
CPU time = 0 ms, elapsed time = 2 ms.
(10000 row(s) affected)
SQL Server Execution Times:
CPU time = 16 ms, elapsed time = 8143 ms.
SQL Server parse and compile time:
CPU time = 0 ms, elapsed time = 0 ms.
我的问题是,SQL Server 执行时间是什么意思?是仅在数据库中执行查询,还是执行查询,包括将数据传输回运行 SQL Server Management Studio 的客户端?
提前谢谢!