从品牌网站建设到网络营销策划,从策略到执行的一站式服务
建立测试表
网站建设哪家好,找创新互联公司!专注于网页设计、网站建设、微信开发、微信小程序、集团企业网站建设等服务项目。为回馈新老客户创新互联还提供了大余免费建站欢迎大家使用!
create table T_table nologging as select * from dba_objects; create table t_table_1 nologging as select * from dba_tables;
--建立日志记录
create materialized view log on T_table with rowid ,sequence(object_name,object_type,owner) including new values; create materialized view log on t_table_1 with rowid,sequence(table_name) including new values;
--建立物化视图
create materialized view mv_t_table nologging refresh fast on demand with rowid START WITH TO_DATE('21-08-2017 10:09:08', 'DD-MM-YYYY HH24:MI:SS') NEXT SYSDATE + 1/(24*60) as select count(*),a.object_type,a.owner from T_table a,t_table_1 b where a.object_name=b.table_name group by a.object_type,a.owner
--测试
select * from mv_t_table where owner='SYSTEM'; delete from t_table where owner='SYSTEM'; insert into t_table select * from dba_objects where owner='SYSTEM';
--查看日志生成量
select a.name, b.value from v$statname a, v$mystat b where a.statistic# = b.statistic# and a.name = 'redo size';
--查看刷新日志
SELECT owner,mview_name,last_refresh_scn,last_refresh_date,query,REVISION FROM dba_mview_analysis WHERE owner='UTF32';
--查看日志记录表,MLOG$为日志记录表,一旦更新完成,此表的内容会被清掉;
select * from MLOG$_T_TABLE select * from MLOG$_T_TABLE_1;
官方说明参见:http://docs.oracle.com/cd/E11882_01/server.112/e10706/repmview.htm#REPLN265
成都网站建设公司地址:成都市青羊区太升南路288号锦天国际A座10层 建设咨询028-86922220
成都快上网科技有限公司-四川网站建设设计公司 | 蜀ICP备19037934号 Copyright 2020,ALL Rights Reserved cdkjz.cn | 成都网站建设 | © Copyright 2020版权所有.
专家团队为您提供成都网站建设,成都网站设计,成都品牌网站设计,成都营销型网站制作等服务,成都建网站就找快上网! | 成都网站建设哪家好? | 网站建设地图