Sql Server统计查询语句消耗时间
时间:2022-03-14 02:39
方法1【set statistic 】:
set statistics time on
go
xxxx
go
set statistics time off
方法2【getDate()】:
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】:
【转载】http://blog.csdn.net/jcx5083761/article/details/9492947