时间:2021-07-01 10:21:17 帮助过:4人阅读
使用过程
----删除
TRUNCATE TABLE mlog$_xxx_lxz_tmp;
DROP MATERIALIZED VIEW LOG ON xxx_lxz_tmp;
drop materialized view mv_xxx_lxz_tmp
----原表创建增量刷新日志
CREATE MATERIALIZED VIEW LOG ON xxx_lxz_tmp WITH PRIMARY KEY INCLUDING NEW VALUES;
----创建物化视图
CREATE MATERIALIZED VIEW mv_xxx_lxz_tmp
Build immediate //默认方式 创建即刷新 DEFERRED 下次刷新填入数据
REFRESH fast START WITH SYSDATE + 2/24 // fast刷新 开始时间 凌晨两点
NEXT round(sysdate+1) + 2/24 //下次刷新 明天两点
AS SELECT * FROM xxx_lxz_tmp; //语句
与hibernate结合使用
当成表使用即可
oracle物化视图使用+hibernate
标签: