Oracle查看逻辑读、物理读资源占用排行的SQL语句
程序员文章站
2022-05-18 23:47:28
查看逻辑读前10的sql:
复制代码 代码如下:
set linesize 300;
set pagesize 300;
set long 50000;
sele...
查看逻辑读前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;
下一篇: Transact_SQL 小手册