dba_hist* 系列視圖與AWR報告有相當緊密的聯(lián)系
手工創(chuàng)建快照
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 - 相對于這一次統(tǒng)計時間段類的變化量
問題:
字段 space_used_total执俩、space_used_delta 的數(shù)據(jù)是如何統(tǒng)計出來的?
附
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>