zoukankan      html  css  js  c++  java
  • 物化视图

    物化视图基本操作

    创建物化视图日志
    create materialized view log on cps_identity_account  including new values;

    删除物化视图日志
    drop materialized view log on cpsmgt.cps_identity_account;

    创建视图
    ----(1)-----有主键
    create materialized view mv_cps_identity_account
    refresh fast on demand
    as
    select * from
    from cpsmgt.cps_identity_account@ic;

    ----(2)-----没有主键和索引
    create materialized view lbi_ods.mv_cps_trans_record
    refresh fast on demand with rowid
    as
    select * from cps_trans_record@tc;


    ------------删除视图
    drop materialized view  mv_cps_identity_account;


    ------------刷新视图(原表不含分区)
    create or replace procedure prc_o_mv_cps_identity_account(         iv_min     in varchar2/*,
                                                      oi_return out integer*/)
         authid current_user
    /** head
      * @name lbi_ods.prc_o_mv_cps_customer_account
      * @caption
      * @type   collected by every 5 minutes
      * @parameter iv_date in varchar2   statis date, format:yyyymmdd
      * @parameter oi_return out integer   execute state: 0 means ok ; others means error.
      * @target lbi_ods#mv_test
      * @version 2.0
      * @author liuzan
      * @create-date 2013-08-22
      * @todo
      * @version
      * @mender <>
      * @modify_date <YYYY-M-D>
      * @modify_desc <>
      * @copyright HUAWEI
      */

     is

    begin
        ---refresh mv data
        dbms_mview.refresh('MV_CPS_IDENTITY_ACCOUNT','f');
        commit;
    end ;

  • 相关阅读:
    《一个人的村庄》 ——刘亮程
    uva 11020
    Codeforces Round #190 (Div. 2) B. Ciel and Flowers
    hdu3308 线段树——区间合并
    线段树,区间更新
    vim 被墙
    ubuntu12.04 修复Grub2
    windows下mysql数据库忘记密码
    高性能的异步爬虫
    中间件
  • 原文地址:https://www.cnblogs.com/lytwajue/p/6785451.html
Copyright © 2011-2022 走看看