ITPub博客

首页 > 数据库 > Oracle > 指定快照时间内根据等待类查询消耗较高的sql

指定快照时间内根据等待类查询消耗较高的sql

原创 Oracle 作者:raysuen 时间:2016-10-17 16:38:30 0 删除 编辑
select wait_class_id, wait_class, count(*) cnt  from dba_hist_active_sess_history where snap_id between 5508 and 5518 group by wait_class_id, wait_class order by 3;
select event_id, event, count(*) cnt from dba_hist_active_sess_history  where snap_id between 5508 and 5518 and wait_class_id=3871361733 group by event_id, event order by 3;
select sql_id, count(*) cnt--,INSTANCE_NUMBER 
from dba_hist_active_sess_history where snap_id between 5508 and 5518 and event_id =2701629120 group by sql_id having count(*)>1000 order by 2;
select sql_text from dba_hist_sqltext where sql_id in ('47mxm4f2cftr0','5pydzyuuzy5tp');

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/28572479/viewspace-2126590/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: 获取用户权限
请登录后发表评论 登录
全部评论
擅长oracle,Linux。精通shell,python。

注册时间:2016-08-23

  • 博文量
    145
  • 访问量
    227105