zoukankan      html  css  js  c++  java
  • 详解 db file sequential read 等待事件

    详解 db file sequential read 等待事件
    https://blog.csdn.net/wuweilong/article/details/43989513

    需要注意的db file sequential read 并不总是对index对像进行资源占用,有时也会对table/partition对像进行资源占用.所以我们需要将P1/P2参数的值进行转换,在此我们会用到视图DBA_EXTENTS以获取对像名.
    但是DBA_EXTENTS是一个复杂的,响应极慢的视图.要想用快一点的方法,X$和DBA_OBJECTS将是一个更好的选择.因为X$BH不占用BUFFER_CACHE所以,访问X$BH会有I/O产生,还有就是DBA-OBJECTS视图不包括rollback 和undo 段,所以如果db file sequential read访问这两个对象,也是不能被解析的.
    查询的例子:
    select b.sid,
    nvl(substr(a.object_name,1,30),
    'P1='||b.p1||' P2='||b.p2||' P3='||b.p3) object_name,
    a.subobject_name,
    a.object_type
    from dba_objects a, v$session_wait b, x$bh c
    where c.obj = a.object_id(+)
    and b.p1 = c.file#(+)
    and b.p2 = c.dbablk(+)
    and b.event = 'db file sequential read'
    union
    select b.sid,
    nvl(substr(a.object_name,1,30),
    'P1='||b.p1||' P2='||b.p2||' P3='||b.p3) object_name,
    a.subobject_name,
    a.object_type
    from dba_objects a, v$session_wait b, x$bh c
    where c.obj = a.data_object_id(+)
    and b.p1 = c.file#(+)
    and b.p2 = c.dbablk(+)
    and b.event = 'db file sequential read'
    order by 1;

    select * from dba_hist_active_sess_history
    where sample_time >to_date('2019-11-08 08:15:00','YYYY-MM-DD HH24:MI:SS')
    and sample_time <= to_date('2019-11-08 08:17:00','YYYY-MM-DD HH24:MI:SS')
    order by sample_time ASC

  • 相关阅读:
    Weblogic 部署注意事项
    Can't load IA 32-bit .dll on a AMD 64-bit platform
    getDeclaredFields()和getFields()
    EJB QI查询
    Git for windows 中文乱码解决方案
    gulp browser-sync自动刷新插件
    input默认提示取消
    devDependencies和dependencies的区别
    npm安装插件提示
    gulp.watch监听文件
  • 原文地址:https://www.cnblogs.com/lipeng20004/p/14101616.html
Copyright © 2011-2022 走看看