得出SQL语句的执行时间的方法
2005-06-03 20:21
260 查看
在网上找的:
--SQL语句前加:
declare @d datetime
set @d=getdate()
--SQL语句
--在SQL语句后加:
select [语句执行花费时间(毫秒)]=datediff(ms,@d,getdate())
这个查询结果不能在查询分析器中直观显示出来,自己改进了一下:
--SQL语句前加:
declare @d datetime
set @d=getdate()
--SQL语句
--在SQL语句后加:
select @d AS '开始时间', getdate() AS '结束时间' , datediff(ms,@d,getdate()) AS '执行时间'
不过这个方法不能对本身耗时很少的查询得出结果。不知有别的什么软件和方法能得出SQL语句的确切的执行时间。
--SQL语句前加:
declare @d datetime
set @d=getdate()
--SQL语句
--在SQL语句后加:
select [语句执行花费时间(毫秒)]=datediff(ms,@d,getdate())
这个查询结果不能在查询分析器中直观显示出来,自己改进了一下:
--SQL语句前加:
declare @d datetime
set @d=getdate()
--SQL语句
--在SQL语句后加:
select @d AS '开始时间', getdate() AS '结束时间' , datediff(ms,@d,getdate()) AS '执行时间'
不过这个方法不能对本身耗时很少的查询得出结果。不知有别的什么软件和方法能得出SQL语句的确切的执行时间。
相关文章推荐
- 得出SQL语句的执行时间的方法
- 得出SQL语句的执行时间的方法
- 得出SQL语句的执行时间的方法
- 得出SQL语句的执行时间的方法
- 项目中调试SQLServer 方便的查看SQL语句的执行时间的方法
- 查看mysql sql 语句执行时间的两种方法
- 在SQLServer上查看SQL语句的执行时间的方法
- 查看django执行的sql语句及消耗时间的两种方法
- 项目中调试SQLServer 方便的查看SQL语句的执行时间的方法
- 计算SQL语句执行时间的方法
- 计算SQL语句执行时间的方法
- PHP获取MySQL执行sql语句的查询时间方法
- SQL 查看SQL语句的执行时间 直接有效的方法
- sqlserver中获取执行sql语句时间的方法
- 项目中调试SQLServer 方便的查看SQL语句的执行时间的方法
- 实现分析sql语句执行过程和编译时间的方法
- 在SQLServer上查看SQL语句的执行时间的方法
- 项目中调试SQLServer 方便的查看SQL语句的执行时间的方法
- SQLServer上查看SQL语句的执行时间的方法
- SQL SERVER 中构建执行动态SQL语句的方法