首页 > 数据库技术 > 详细

SQL SERVER 查看sql语句性能与执行时间

时间:2019-01-11 17:40:57      阅读:263      评论:0      收藏:0      [点我收藏+]

【方法一】

set statistics profile on
set statistics io on
set statistics time on
go
--sql语句
go
set statistics profile off
set statistics io off
set statistics time off

 

【方法二】

declare @starttime datetime

set @starttime=getdate()

begin

--sql语句

end

select datediff(ms,@starttime,getdate())

 

SQL SERVER 查看sql语句性能与执行时间

原文:https://www.cnblogs.com/itsone/p/10256392.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!