现在有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数据却没有更新,怎么回事?
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数据却没有更新,怎么回事?
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.
with sysdate+3/86400 next sysdate + 3/86400但是还是不行。
还有 我记得 fast refresh 是需要有 log 的吧
s2_emp 不需要吗?
主要是我还设置了next sysdate + 1/86400这个命令啊,今后每隔一秒刷新一次,s2_emp会对s1_emp不停地刷新。
先找到root cause 再说呀。