查看SQL语句在SQL Server上的执行时间

set statistics profile on
set statistics io on
set statistics time on
go
--begin <这里写上你的语句...>
 
select * from ...... 
 
--end <这里写上你的语句...>

set statistics profile off
set statistics io off
set statistics time OFF
go

--执行后查看【消息】,有很清楚的执行情况。

原文地址:https://www.cnblogs.com/OwenWu/p/3857969.html