方法一:

select * from (
select owner,object_name, object_type, statistic_name, sum(value)
from v$segment_statistics
group by owner,object_name, object_type, statistic_name
order by sum(value) desc)
where rownum <10;

方法二:

select * from
(select c.owner, c.object_name, sum(a.tch)
from x$bh a, v$latch_children b, dba_objects c
where a.hladdr=b.addr and a.obj=c.object_id
and b.name='cache buffers chains'
and c.owner <> 'SYS'
group by c.owner, c.object_name
order by sum(a.tch) desc)
where rownum <= 25;

-- By 许望(RHCA、OCM、VCP)
最后修改:2020 年 01 月 06 日 10 : 57 AM
如果觉得我的文章对你有用,请随意赞赏