谢谢!
我自己也看了一下,materialized view log里面应该纪录了一些DML信息,force(incremental)应该是依据这些信息决定哪些纪录需要refresh,然后从基表检索更新所涉及的纪录。(你说的merge into好像跟incremental差不多抽象哦
)
另外on demand 和 query rewrite 互斥的说法我没有找到出处,请明示。
oracle文档种关于query rewrite的restrictions说法:
You should keep in mind the following restrictions:
The defining query of the materialized view cannot contain any non-repeatable expressions (ROWNUM, SYSDATE, non-repeatable PL/SQL functions, and so on).
The query cannot contain any references to RAW or LONG RAW datatypes or object REFs.
If the defining query of the materialized view contains set operators (UNION, MINUS, and so on), rewrite will use them for full text match rewrite only.
If the materialized view was registered as PREBUILT, the precision of the columns must agree with the precision of the corresponding SELECT expressions unless overridden by the WITH REDUCED PRECISION clause.
If the materialized view contains the same table more than once, it is possible to do a general rewrite, provided the query has the same aliases for the duplicate tables as the materialized view.
General Query Rewrite Restrictions
You should keep in mind the following restrictions:
If a query has both local and remote tables, only local tables will be considered for potential rewrite.
Neither the detail tables nor the materialized view can be owned by SYS.
SELECT and GROUP BY lists, if present, must be the same in the query of the materialized view.
Aggregate functions must occur only as the outermost part of the expression. That is, aggregates such as AVG(AVG(x)) or AVG(x)+ AVG(x) are not allowed.
CONNECT BY clauses are not allowed.