4 zf AAAVs6AAEAAAAJVAAD 14 20170809 16:16:01 I N FE 844463584838593
7 rows selected.
如果这时再次刷新物化视图MV_T_ID,则只有ID=4的这条记录的SNAPTIME$$的时间点大于MV_T_ID上次刷新的时间点,因此,只刷新这一条记录,且不会改变SNAPTIME$$的值。
zx@ORA11G>exec dbms_mview.refresh('MV_T_ID');
PL/SQL procedure successfully completed.
zx@ORA11G>select mview_name,last_refresh_date, staleness from user_mviews;
MVIEW_NAME LAST_REFRESH_DATE STALENESS
------------------------------ ----------------- -------------------
MV_T_BOTH 20170809 15:45:10 NEEDS_COMPILE
MV_T_ID 20170809 16:17:43 FRESH
MV_T_NAME 20170809 16:16:01 FRESH
zx@ORA11G>select * from mlog$_t;
ID NAME M_ROW$$ SEQUENCE$$ SNAPTIME$$ D O CHANGE_VECTOR$$ XID$$
-------------------- ---------- ------------------------------ -------------------- ----------------- - - ------------------------------ --------------------
1 zx AAAVs6AAEAAAAJVAAA 8 20170809 15:58:30 I N FE 2814882911093459
2 wl AAAVs6AAEAAAAJVAAB 9 20170809 15:58:30 I N FE 2814882911093459
3 yc AAAVs6AAEAAAAJVAAC 10 20170809 15:58:30 I N FE 2814882911093459
3 yc AAAVs6AAEAAAAJVAAC 11 20170809 15:58:30 U U 08 2814882911093459
3 yc AAAVs6AAEAAAAJVAAC 12 20170809 15:58:30 U N 08 2814882911093459
2 wl AAAVs6AAEAAAAJVAAB 13 20170809 15:58:30 D O 00 2814882911093459
4 zf AAAVs6AAEAAAAJVAAD 14 20170809 16:16:01 I N FE 844463584838593