oracle查看逻辑读、物理读资源占用排行的sql语句
2015-01-04来源:易贤网

查看逻辑读前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;

更多信息请查看IT技术专栏

推荐信息