--查看低效sql方法如下
select
a.sql_text,
a.executions,
a.disk_reads,
a.buffer_gets,
round((a.buffer_gets-a.disk_reads)/a.disk_reads,2) hit_radio,
round(a.disk_reads/a.executions,2) read_per_run
from v$sqlarea a
where a.executions>0
and a.buffer_gets>0
and a.disk_reads>0
and (a.buffer_gets-a.disk_reads)/a.disk_reads<0.8
order by 4 desc;
注意:
对于高效sql:把 (a.buffer_gets-a.disk_reads)/a.disk_reads<0.8改为 (a.buffer_gets-a.disk_reads)/a.disk_reads>0.8即可
本栏目更多精彩内容:http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/
时间: 2024-09-09 03:47:39