日期:2014-05-17  浏览次数:21212 次

关于物化视图 on commit刷新的问题请教
create materialized view VIEW_A_B
refresh fast on commit as
(select a.id as a_id
 b.name as b_name
from a left join b
on a.id = b.id);


这样建视图 说不能用on commit 刷新
怎么样才能建on commit的物化视图
a b 都建了view log 了
a表是分区表 跟这个有关系吗

------解决方案--------------------
In addition for M.V.'s with Single-Table Aggregates and Materialized Views
with Joins and Aggregates, there are some more conditions on refresh
to the ones mentioned above:
Joins and Aggregates : 
===================== 

i)The WHERE clause can contain inner equi-joins only
(that is, no outer joins)
ii)Materialized views from this category are FAST refreshable after
Direct Load to the base tables; they are not FAST refreshable after 
conventional DML to the base tables.
iii)Materialized views from this category can have only the
ON DEMAND option (so, the on-commit cannot be used for this category

j就是説多表不可以on-commit
想想也是,让视图监视所有表的事务,代价太大