Sql server统计查询语句消耗时间

xiaoxiao2021-03-01  6

1.

set statistics time on go xxxx go set statistics time off

2.

DECLARE @begin dateTime DECLARE @end dateTime SET @begin=getdate(); BEGIN xxxx end set @end=getdate(); SELECT datediff(ms,@begin,@end) as 'Elapsed Time'

3. 也可以设置Query-Query options

转载请注明原文地址: https://www.6miu.com/read-3650222.html

最新回复(0)