SQL Server中sql语句执行时间

1. 只是查看执行时间
set   statistics   time   on
go
   --放入你要执行的语句
go
set   statistics   time   off

2. 还要查看更多信息:

set statistics profile on
set statistics io on
set statistics time
on
go
--放入你要执行的语句
go
set statistics profile off
set
statistics io off
set statistics time off

原文地址:https://www.cnblogs.com/ry123/p/2736902.html