门户网站开发请示,东莞seo公司首选3火星,网站建设下一步计划,产品设计用什么软件好script from macleanhttp://www.askmaclean.com/archiv ... t-grow-history.htmlScript:查找表或索引增长的历史信息MARCH 22, 2012 BY MACLEAN LIU 4 COMMENTS有同学在Oracle ALL STARS群中提问 如何通过AWR来查找一段时间内#xff0c;数据库段对象(堆表、索引)等的空间增长…script from macleanhttp://www.askmaclean.com/archiv ... t-grow-history.htmlScript:查找表或索引增长的历史信息MARCH 22, 2012 BY MACLEAN LIU 4 COMMENTS有同学在Oracle ALL STARS群中提问 如何通过AWR来查找一段时间内数据库段对象(堆表、索引)等的空间增长信息。在Oracle 10g开始awr自动负载仓库引入了dba_hist_seg_stat视图该视图记录了快照时间内segment-level段级的历史统计信息DBA_HIST_SEG_STAT displays historical information about segment-level statistics. This view captures the top segments based on a set of criteria and captures information from V$SEGSTAT. The total value is the value of the statistics since instance startup. The delta value is the value of the statistics from the BEGIN_INTERVAL_TIME to the END_INTERVAL_TIME in the DBA_HIST_SNAPSHOT view.我们可以通过以下SQL脚本来列出相关段对象在 快照时间内的使用空间的历史变化信息column owner format a16column object_name format a36column start_day format a11column block_increase format 9999999999select obj.owner, obj.object_name,to_char(sn.BEGIN_INTERVAL_TIME,RRRR-MON-DD) start_day,sum(a.db_block_changes_delta) block_increasefrom dba_hist_seg_stat a,dba_hist_snapshot sn,dba_objects objwhere sn.snap_id a.snap_idand obj.object_id a.obj#and obj.owner not in (SYS,SYSTEM)and end_interval_time between to_timestamp(01-JAN-2000,DD-MON-RRRR)and to_timestamp(02-FEB-2013,DD-MON-RRRR)group by obj.owner, obj.object_name,to_char(sn.BEGIN_INTERVAL_TIME,RRRR-MON-DD)order by obj.owner, obj.object_name/修改可得select obj.owner, obj.object_name,to_char(sn.BEGIN_INTERVAL_TIME,RRRR-MON-DD) start_day,sum(a.PHYSICAL_READS_DELTA) block_readfrom dba_hist_seg_stat a,dba_hist_snapshot sn,dba_objects objwhere sn.snap_id a.snap_idand obj.object_id a.obj#and obj.owner not in (SYS,SYSTEM)and end_interval_time between to_timestamp(01-JAN-2000,DD-MON-RRRR)and to_timestamp(02-FEB-2013,DD-MON-RRRR)group by obj.owner, obj.object_name,to_char(sn.BEGIN_INTERVAL_TIME,RRRR-MON-DD)order by obj.owner, obj.object_name/