您的位置:首页 > 博客中心 > 数据库 >

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

时间:2022-03-14 02:39

方法1【set statistic 】:

set statistics time on
go
 xxxx
go
set statistics time off

gxlsystem.com,布布扣

 

方法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‘

gxlsystem.com,布布扣

 

方法3【设置Query-Query options】:

gxlsystem.com,布布扣

 

【转载】http://blog.csdn.net/jcx5083761/article/details/9492947

 

热门排行

今日推荐

热门手游