create materialized view MV_XXXX
refresh fast on commit
with rowid
enable query rewrite
as
select *
from SYS_USER
where (USER_STATUS=0 AND USER_HR=1);
oracle 有个机制,一旦条件与物化视图里的一样,那么会自动使用物化视图表
DROP materialized view log on TAB_NAME ; --不是view名,是表名
CREATE MATERIALIZED VIEW LOG ON TAB_NAME WITH ROWID;