码迷,mamicode.com
首页 > 其他好文 > 详细

查看回话资源消耗情况

时间:2018-08-14 17:05:05      阅读:113      评论:0      收藏:0      [点我收藏+]

标签:HERE   dual   sid   can   rom   stat   bsp   div   查看   

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

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%‘;

  

 

查看回话资源消耗情况

标签:HERE   dual   sid   can   rom   stat   bsp   div   查看   

原文地址:https://www.cnblogs.com/hanglinux/p/9475385.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!