Loading

查看回话资源消耗情况

---查看某个回话的统计信息

select a.STATISTIC#,a,name,a.class,b.value,a.STAT_ID
from v$statname a,v$sesstat b,v$session s
where s.sid=b.sid
and b.STATISTIC#=a.STATISTIC#
and s.sid=35
and name like '%sort%';

---查看当前回话的统计信息
select a.STATISTIC#,a.name,a.class,b.value,a.STAT_ID
from v$statname a,v$sesstat b,v$session s
where s.sid=b.sid
and b.STATISTIC#=a.STATISTIC#
and s.sid=(select userenv('sid') from dual)
and name like '%sort%';


select a.STATISTIC#,a.name,a.class,b.value,a.STAT_ID
from v$statname a,v$sesstat b,v$session s
where s.sid=b.sid
and b.STATISTIC#=a.STATISTIC#
and s.sid=(select userenv('sid') from dual)
and name like '%parse%';


select a.STATISTIC#,a.name,a.class,b.value,a.STAT_ID
from v$statname a,v$sesstat b,v$session s
where s.sid=b.sid
and b.STATISTIC#=a.STATISTIC#
and s.sid=(select userenv('sid') from dual)
and name like '%table scan%';

  

 

posted @ 2018-08-14 16:26  李行行  阅读(105)  评论(0编辑  收藏  举报