create materialized view v1 build immediate refresh on commit as select * from t1 其中refresh on commit表示在t1改变时v1也会改变
你不可能会需要每秒都刷新MV,可以设定刷新的时间间隔,参考: create materialized view info.v_userinfo STORAGE (INITIAL 1M NEXT 1M PCTINCREASE 0) tablespace info_data parallel build immediate refresh force start with sysdate next sysdate +5/(24*60) AS select * from info.t_userinfo where optrid not like 'I%' and subscrbseq=1其中的next sysdate +5/(24*60)设定每5分钟刷新一次!
build immediate refresh on commit
as select * from t1
其中refresh on commit表示在t1改变时v1也会改变
create materialized view info.v_userinfo
STORAGE (INITIAL 1M NEXT 1M PCTINCREASE 0)
tablespace info_data
parallel
build immediate
refresh force start with sysdate next sysdate +5/(24*60)
AS
select * from info.t_userinfo where optrid not like 'I%' and subscrbseq=1其中的next sysdate +5/(24*60)设定每5分钟刷新一次!