美文网首页
Oracle DBA_HIST_SNAPSHOT

Oracle DBA_HIST_SNAPSHOT

作者: 黑白_a9aa | 来源:发表于2019-06-21 16:36 被阅读0次

    dba_hist* 系列视图与AWR报告有相当紧密的联系

    手工创建快照

    exec dbms_workload_repository.create_snapshot();
    

    快照查看

    select * from dba_hist_snapshot order by snap_id desc;
    

    dba_hist相关的一系列视图

    select snap_id,instance_number,obj#,space_allocated_total,space_allocated_delta from dba_hist_seg_stat
    where obj#=(
        select object_id from dba_objects where object_name=upper('ibs_space_test'))
    order by snap_id desc;
    

    说明:
    space_allocated_total - 相对于实例启动时的变化量
    space_allocated_delta - 相对于这一次统计时间段类的变化量

    问题:
    字段 space_used_total、space_used_delta 的数据是如何统计出来的?

    SQL> select view_name from dba_views where view_name like upper('%dba_hist%');
    
    VIEW_NAME
    ------------------------------
    DBA_HIST_ACTIVE_SESS_HISTORY
    DBA_HIST_ASH_SNAPSHOT
    DBA_HIST_BASELINE
    DBA_HIST_BASELINE_DETAILS
    DBA_HIST_BASELINE_METADATA
    ……
    
    111 rows selected.
    
    SQL> 
    

    相关文章

      网友评论

          本文标题:Oracle DBA_HIST_SNAPSHOT

          本文链接:https://www.haomeiwen.com/subject/jncuqctx.html