方法一:
PRINT GETDATE()

方法二:
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

本文介绍了两种SQL性能调优的方法,第一种是使用PRINTGETDATE()来检查SQL语句的执行时间,第二种是通过设置SQL Server的统计信息,包括profile、io和time,来深入分析SQL语句的执行效率。
方法一:
PRINT GETDATE()

方法二:
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


被折叠的 条评论
为什么被折叠?