查询session status各项统计数据的前三名
select * from (select row_number() over(partition by a.STATISTIC# order by a.value desc) size_rank, a.sid, b.name, a.value from v$sesstat a,v$statname b,v$session c where c.STATUS='ACTIVE' and c.USERNAME is not null and a.sid=c.sid and a.STATISTIC#=b.STATISTIC# order by a.value desc) where size_rank <= 3 and name like '%&NAME%' and sid like '%&SID%' order by name, size_rank;
作者:czjie
出处:http://www.cnblogs.com/czjie/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。