Select TOP 10
ST.text AS '执行的SQL语句',
QS.execution_count AS '执行次数',
QS.total_elapsed_time AS '耗时',
QS.total_logical_reads AS '逻辑读取次数',
QS.total_logical_writes AS '逻辑写入次数',
QS.total_physical_reads AS '物理读取次数',
QS.creation_time AS '执行时间'
FROM sys.dm_exec_query_stats QS
CROSS APPLY
sys.dm_exec_sql_text(QS.sql_handle) ST
Where QS.creation_time > dateadd(minute,-1,GETDATE()) --当前时间前一分钟
-- Where QS.creation_time BETWEEN '2015-08-01 00:00:00' AND '2015-09-02 11:00:00'
ORDER BY QS.total_elapsed_time DESC
相关文章
- 06-01sqlalchemy 执行原生sql语句
- 06-01Hibernate执行SQL语句实现查询修改功能!
- 06-01Yii2获取当前程序执行的sql语句
- 06-01SQL-Server多表关联查询并分页
- 06-01SQL语句执行时间测试
- 06-01SQL查询语句(where、jion、limit、group by、having等等)执行先后顺序
- 06-01【SQL】在一个含有group by的查询sql中,同时存在having和where,sql在解析执行的时候,先执行的是哪一个?
- 06-01SQL语句的执行顺序
- 06-01springboot集成mybatis 控制打印sql语句,不打印执行结果集
- 06-01Java学习日志Day31_ResultSet_jdbc查询员工表_Statement执行DDL,DML语句的弊端_PreparedStatement_数据库连接池(初窥)