[讨论] Oracle 清除Mview log 要很久

楼主: chings22 (chings22)   2021-09-19 14:01:07
有一个table 只有200MB左右,但mview refresh 要很久
去看 MLOG$_name 有30GB,看网络文章应该是refresh时有中断过
清除的方法是 DBMS_MVIEW.PURGE_LOG ('table_name',1);
但我一执行,就有user受影响,只能选没人用的时间,也不好挑时间
想说用source端truncate MLOG$_name
truncate table [owner].[MLOG$_name];
再complete refresh,
dbms_mview.refresh('mview_name', method => 'C' );
这可行吗?

Links booklink

Contact Us: admin [ a t ] ucptt.com