create table diag.segment_hist as select * from v$segment_statistics where 1=2;
alter table diag.segment add dd date;
每隔5分执行一次
insert into diag.segment_hist(OWNER,OBJECT_NAME,SUB_OBJECT_NAME,TABLESPACE_NAME,TS#,OBJ#,DATAOBJ#,STATISTIC_NAME,STATISTIC#,VALUE,DD)
SELECT OWNER,OBJECT_NAME,SUB_OBJECT_NAME,TABLESPACE_NAME,TS#,OBJ#,DATAOBJ#,STATISTIC_NAME,STATISTIC#,VALUE,SYSDATE
FROM v$segment_statistics where STATISTIC_NAME='db block changes';
select distinct dd from diag.segment_hist;
select a.owner,a.object_name,(a.value-b.value) increase
from diag.segment_hist a,diag.segment_hist b
where a.dd='' and b.dd='' and a.OBJ#=b.OBJ#;