码迷,mamicode.com
首页 > 数据库 > 详细

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

时间:2014-11-18 23:12:52      阅读:219      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   io   color   ar   sp   strong   on   

方法1set statistic 】:

set statistics time on
go
 xxxx
go
set statistics time off

bubuko.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‘

bubuko.com,布布扣

 

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

bubuko.com,布布扣

 

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

 

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

标签:style   blog   http   io   color   ar   sp   strong   on   

原文地址:http://www.cnblogs.com/julin-peng/p/4106031.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!