查看sql语句执行效率
来源:互联网 发布:信誉好的淘宝高仿nike 编辑:程序博客网 时间:2024/05/18 01:55
在SQL Server数据库中,如何才能查看SQL语句的执行时间呢?本文将为您介绍查询方法,供您参考,希望对您能够有所帮助。
下面这种是SQL Server中比较简单的查询SQL语句执行时间方法,通过查询前的时间和查询后的时间差来计算的:
declare @begin_date datetime
declare @end_date datetime
select @begin_date = getdate()
<这里写上你的语句...>
select @end_date = getdate()
select datediff(ms,@begin_date,@end_date) as '用时/毫秒'
2:下面这种方法比较全面,将执行每个语句时采取的步骤作为行集返回,通过层次结构树的形式展示出来
set statistics profile on
set statistics io on
set statistics time on
go
<这里写上你的语句...>
go
set statistics profile off
set statistics io off
set statistics time off
- 查看sql语句执行效率
- 查看SQL语句执行效率
- MySQL查看SQL语句执行效率
- MySQL查看SQL语句执行效率
- MySQL查看SQL语句执行效率
- MySQL查看SQL语句执行效率
- MySQL查看SQL语句执行效率
- MySQL查看SQL语句执行效率
- MySQL查看SQL语句执行效率
- Postgresql查看SQL语句执行效率
- sql server 查看执行效率低下的语句
- 查看Sql Server语句执行效率,时间的方法
- MySQL 使用 explain 查看SQL语句执行效率
- mysql中explain查看sql语句执行效率
- Explain命令查看MySQL的SQL语句执行效率
- 查看sql的执行效率
- 查看数据库sql执行效率
- SQL语句执行效率测试
- C#中在内容页获取其模板页中的变量,或者值
- 测试flash之小工具
- Linux C substring 子字符串
- poj 3414 Pots
- sicily--1145. 校门外的树
- 查看sql语句执行效率
- log4j和slf4j
- android 调用系统相机拍照 获取原图
- 值得思考的事(Linux)
- HTML5移动Web开发指南
- android adb 命令
- snprintf函数
- CSS中 ID和CLASS的区别
- sicily--1232. Electrical Outlets