dbms_redefinition.start_redef_table中参数options_flag有
1.dbms_redefinition.cons_use_pk
2.dbms_redefinition.cons_use_rowid
1.使用cons_use_pk重定义的时候创建的物化视图是基于普通的刷新模式.
如:
CREATE MATERIALIZED VIEW OSS_MOBILE_LOGIN_LIST_MON01
ON PREBUILT TABLE
REFRESH FAST ON DEMAND
AS
SELECT "OSS_MOBILE_LOGIN_LIST_MON_TMP"."MONTHNO" "MONTHNO","OSS_MOBILE_LOGIN_LIST_MON_TMP"."PROVCODE" "PROVCODE","OSS_MOBILE_LOGIN_LIST_MON_TMP"."AREACODE" "AREACODE","OSS_MOBILE_LOGIN_LIST_MON_TMP"."USERNUMBER" "USERNUMBER","OSS_MOBILE_LOGIN_LIST_MON_TMP"."VERSION_TYPE" "VERSION_TYPE","OSS_MOBILE_LOGIN_LIST_MON_TMP"."OPER_COUNT" "OPER_COUNT","OSS_MOBILE_LOGIN_LIST_MON_TMP"."CREATETIME" "CREATETIME","OSS_MOBILE_LOGIN_LIST_MON_TMP"."MODIFYTIME" "MODIFYTIME" FROM "HXL"."OSS_MOBILE_LOGIN_LIST_MON_TMP" "OSS_MOBILE_LOGIN_LIST_MON_TMP";
2.使用cons_use_rowid重定义的时候创建的物化视图是基于ROWID刷新的。
如:
CREATE MATERIALIZED VIEW OSS_MOBILE_LOGIN_LIST_MON01
ON PREBUILT TABLE
REFRESH FAST ON DEMAND
WITH ROWID
AS
SELECT "OSS_MOBILE_LOGIN_LIST_MON_TMP"."MONTHNO" "MONTHNO","OSS_MOBILE_LOGIN_LIST_MON_TMP"."PROVCODE" "PROVCODE","OSS_MOBILE_LOGIN_LIST_MON_TMP"."AREACODE" "AREACODE","OSS_MOBILE_LOGIN_LIST_MON_TMP"."USERNUMBER" "USERNUMBER","OSS_MOBILE_LOGIN_LIST_MON_TMP"."VERSION_TYPE" "VERSION_TYPE","OSS_MOBILE_LOGIN_LIST_MON_TMP"."OPER_COUNT" "OPER_COUNT","OSS_MOBILE_LOGIN_LIST_MON_TMP"."CREATETIME" "CREATETIME","OSS_MOBILE_LOGIN_LIST_MON_TMP"."MODIFYTIME" "MODIFYTIME" FROM "HXL"."OSS_MOBILE_LOGIN_LIST_MON_TMP" "OSS_MOBILE_LOGIN_LIST_MON_TMP";
阅读(3603) | 评论(0) | 转发(0) |