建立物化视图步骤:
步骤1、建立物化视图日志
sql> create materialized view LOG on service_t with primary key;
步骤2、建立物化视图
sql> create materialized view oscar refresh fast on commit with primary key disable query rewrite as select poid_id0 from service_t;
Materialized view created.
步骤3、删除物化视图
删除物化视图日志:DROPMATERIALIZEDVIEWlogoNDAVE;
删除物化视图 : DROPMATERIALIZEDVIEWMV_DAVE;
步骤4、查询物化视图状态
sql>SELECTMVIEW_NAME,LAST_REFRESH_DATE,STALENESSFROM USER_MVIEWS;
sql>SELECTNAME,LAST_REFRESHFROMUSER_MVIEW_REFRESH_TIMES;
参考博文:
原文链接:https://www.f2er.com/oracle/213740.html