现在有emp表,对emp创建快照日志:
create snapshot log on emp创建快照实体表s1_emp:
create snapshot  s1_emp as select * from emp对快照实体表s1_emp创建快照日志:
create snapshot log on s1_emp创建快照实体表s2_emp:
create snapshot  s2_emp as select * from s1_emp对两个快照表设置更新时间1s:
alter snapshot s1_emp refresh fast start with sysdate+1/86400 next sysdate + 1/86400;
alter snapshot s2_emp refresh fast start with sysdate+1/86400 next sysdate + 1/86400;整体过程为emp---快照--->s1_emp---快照--->s2_emp,更新时间都为1s现在对emp表进行更新操作
update emp set ename='kxf' where empno=7934;结果是在s1_emp里数据已更新,而s2_emp数据却没有更新,怎么回事?

解决方案 »

  1.   

    试一下: 第一个和第二个时间 不要同一时间刷新。If you want to use fast refresh, you should fast refresh all the materialized views
    along any chain. It makes little sense to define a fast refreshable materialized
    view on top of a materialized view that must be refreshed with a complete
    refresh.
    If you want the highest level materialized view to be fresh with respect to the
    detail tables, you need to ensure that all materialized views in a tree are
    join_sales_cust_time
    customers sales times products
    sum_sales_cust_time join_sales_cust_time_prodrefreshed in the correct dependency order before refreshing the highest-level.
    Oracle does not provide support for automatic refreshing of intermediate
    materialized views in a nested hierarchy. If the materialized views under the
    highest-level materialized view are stale, refreshing only the highest-level will
    succeed, but makes it fresh only with respect to its underlying materialized
    view, not the detail tables at the base of the tree.
      

  2.   

    把第二个的刷新时间设置成这个可以么:
    with sysdate+3/86400 next sysdate + 3/86400但是还是不行。
      

  3.   

    第二个 要保证在第一完成之后再运行。
    还有 我记得 fast refresh 是需要有 log 的吧
    s2_emp 不需要吗?
      

  4.   


    主要是我还设置了next sysdate + 1/86400这个命令啊,今后每隔一秒刷新一次,s2_emp会对s1_emp不停地刷新。
      

  5.   

    那你可以测试下 把时间间隔设大点, 看是不时这个原因造成的。
    先找到root cause 再说呀。
      

  6.   

    时间加大也不行,sysdate + 12/86400,没反应,我觉得问题好像不在时间上。当我把s2_emp  drop后,再创建,即可得到修改后的值