Oracle查看逻辑读、物理读资源占用排行的SQL语句
Oracle查看逻辑读、物理读资源占用排行的SQL语句
发布时间:2016-12-28 来源:查字典编辑
摘要:查看逻辑读前10的SQL:复制代码代码如下:setlinesize300;setpagesize300;setlong50000;SELEC...

查看逻辑读前10的SQL:

复制代码 代码如下:

set linesize 300;

set pagesize 300;

set long 50000;

SELECT *

FROM (

SELECT sql_fulltext AS sql, SQL_ID,buffer_gets / executions AS "Gets/Exec",buffer_gets, executions

FROM V$SQLAREA

WHERE buffer_gets > 10000

ORDER BY "Gets/Exec" DESC

)

WHERE rownum <= 10;

查看物理读前10的SQL:

复制代码 代码如下:

set linesize 300;

set pagesize 300;

set long 50000;

SELECT *

FROM (

SELECT sql_fulltext AS sql, SQL_ID,disk_reads / executions AS "Reads/Exec",disk_reads, executions

FROM V$SQLAREA

WHERE disk_reads > 1000

ORDER BY "Reads/Exec" DESC

)

WHERE rownum <= 10;

推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
相关阅读
网友关注
最新Oracle教程学习
热门Oracle教程学习
编程开发子分类