项目中调试SQLServer 方便的查看SQL语句的执行时间的方法

第一种方法:将执行每个语句时采取的步骤作为行集返回,通过层次结构树的形式展示出来

set statistics profile on 
set statistics io on 
set statistics time on 
go 
--写SQL语句的地方
SELECT * FROM [dbo].[DT_CVPrice]


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

第二种方法:用Sql Server 自带的工具

位置:工具》选项》查询执行》高级


效果图下图:


猜你喜欢

转载自blog.csdn.net/weixin_38668828/article/details/80063540