FORCE Clause
Specify FORCE
to indicate that when a refresh occurs, Oracle will perform a fast refresh if one is possible or a complete refresh otherwise. If you do not specify a refresh method (FAST
, COMPLETE
, or FORCE
), FORCE
is the default.
ON DEMAND Clause
Specify ON
DEMAND
to indicate that the materialized view will be refreshed on demand by calling one of the three DBMS_MVIEW
refresh procedures. If you omit both ON
COMMIT
and ON
DEMAND
, ON
DEMAND
is the default.
1>Create materialized view log
Create materialized view log on po.po_headers_all with rowid;
2>Create materialized view
Create materialized view vscn_po_headers_mv
refresh fast on demand
start with sysdate next sysdate + 10/(60*24)
as select * from po.po_headers_all;
3>Select
select *
from dba_mviews
where mview_name='VSCN_PO_HEADERS_MV';
select *
from dba_mview_logs
where log_table='MLOG$_PO_HEADERS_ALL';
4>Alter materialized view
alter materialized view vscn_po_headers_mv
refresh force;
5>Drop materialized view /log
drop materialized view vscn_po_headers_mv;
drop materialized view log on po.po_headers_all;
阅读(1137) | 评论(0) | 转发(0) |