欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

查看SQL语句的执行时间的方法

程序员文章站 2024-03-25 14:39:46
...

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

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 自带的工具

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

查看SQL语句的执行时间的方法

效果图下图:

查看SQL语句的执行时间的方法

参考来源:http://www.cnblogs.com/wangguowen27/p/SqlServer_Select_wgw.html