首页 > 其他 > 详细

查看回话资源消耗情况

时间:2018-08-14 16:33:22      阅读:133      评论:0      收藏:0      [点我收藏+]
---查看某个回话的统计信息

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

  

 

查看回话资源消耗情况

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!