Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1851247
  • 博文数量: 334
  • 博客积分: 11301
  • 博客等级: 上将
  • 技术积分: 3452
  • 用 户 组: 普通用户
  • 注册时间: 2006-10-18 10:19
个人简介

路虽弥,不行不至;事虽少,不做不成。

文章分类

全部博文(334)

文章存档

2013年(4)

2012年(19)

2011年(27)

2010年(71)

2009年(45)

2008年(15)

2007年(84)

2006年(69)

分类: Oracle

2010-07-01 17:48:50

 
 
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) |
给主人留下些什么吧!~~