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

    create materialized view 视图名称
    refresh force on demand
    start with to_date('21-07-2020 22:00:00', 'dd-mm-yyyy hh24:mi:ss') next to_date(concat(to_char(sysdate + 1, 'yyyy-MM-dd'), ' 22:00:00'), 'yyyy-MM-dd hh24:mi:ss')
    as
    SQL语句

    物化视图的刷新(refresh)的方法有四种:fast、complete、force和never,Oracle默认采用force方式
    fast:刷新采用增量刷新,只刷新自上次刷新以后进行的修改。
    complete:刷新对整个物化视图进行完全的刷新。
    force:刷新时会去判断是否可以进行快速刷新,如果可以则采用fast方式,否则采 用complete的方式。
    never:指物化视图不进行任何刷新。

    物化视图的类型有两种:on demand和on commit
    on demand:仅在该物化视图“需要”被刷新了,才进行刷新(refresh),更新物化视图,以保证和基表数据的一致性。
    on commit:一旦基表有了commit,即事务提交,则立刻刷新,立刻更新物化视图,使得数据和基表一致。

    start with …… next ……

    这个是设置刷新时间的,上面的设置的是每天10点

    也可以手动刷新

    BEGIN DBMS_MVIEW.REFRESH ( list => '视图名称', Method =>'刷新方式', refresh_after_errors => True); END;

  • 相关阅读:
    CQUOJ 10819 MUH and House of Cards
    CQUOJ 9920 Ladder
    CQUOJ 9906 Little Girl and Maximum XOR
    CQUOJ 10672 Kolya and Tandem Repeat
    CQUOJ 9711 Primes on Interval
    指针试水
    Another test
    Test
    二分图匹配的重要概念以及匈牙利算法
    二分图最大匹配
  • 原文地址:https://www.cnblogs.com/IceBlueBrother/p/13353601.html
Copyright © 2011-2022 走看看