oracle materialized view

create materialized view reg_count_mv
TABLESPACE AHP_DATA_T01 --保存表空间
BUILD IMMEDIATE --延迟刷新不立即刷新 build immediate/DEFERRED
refresh force --如果可以快速刷新则进行快速刷新,否则完全刷新[fast/complete/force(default)]
on commit --按照指定方式刷新on DEMAND/commit, if on demand the two lines below are required.
--start with to_date('24-11-2005 18:00:10', 'dd-mm-yyyy hh24:mi:ss') --第一次刷新时间
--next TRUNC(SYSDATE+1)+18/24 --刷新时间间隔
as 
select count(*) from oac_oa_registration r, oac_oa_sod_infrmtn i 
where r.id = i.rid;
 

with reference to http://wallimn.iteye.com/blog/664447

你可能感兴趣的:(oracle,Blog)