这个视图用来找出性能最差的SQL语句。
select b.usesrname, a.disk_reads,
a.excutions exec,
a.disk_reads/decode(a.executions, 0, 1,
a.executions) rds_exec_ratio,
a.sql_text statement
from v$sqlarea a, dba_users b
where a.parsing_user_id=b.user_id
and
a.disk_reads>10000
order by a.disk_reads desc
可以用buffer_gets代替上面的disk_reads 来查询内存使用最多的SQL语句。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/37724/viewspace-152498/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/37724/viewspace-152498/
博客介绍了用于找出性能最差的SQL语句的视图及对应SQL查询代码,还提到可以用buffer_gets代替disk_reads来查询内存使用最多的SQL语句,同时给出了博客来源及转载要求。

161

被折叠的 条评论
为什么被折叠?



