主表一改变,实例视图自动刷新,而不是等到刷新周期到的时候才刷新。

解决方案 »

  1.   

    视图本来就是一个select语句,怎么会需要刷新呢?继续关注。
      

  2.   

    create materialized view v1
    build immediate refresh on commit 
    as select * from t1
    其中refresh on commit表示在t1改变时v1也会改变
      

  3.   

    你不可能会需要每秒都刷新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分钟刷新一次!