Oracle DBA_HIST_SNAPSHOT

2019-06-21  本文已影响0人  黑白_a9aa

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> 
上一篇下一篇

猜你喜欢

热点阅读