扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
今天Kamus在Gtalk上让我帮忙测试,是关于物化视图的:
测试Oralce9i的情况:
SQL> create table T_PART Table created. 1 row created. SQL> insert into t_part values(1,25,3); 1 row created. SQL> insert into t_part values(1,18,3); 1 row created. SQL> commit; Commit complete. SQL> create materialized view log on t_part with rowid; Materialized view log created. SQL> create materialized view mv_t_part refresh with rowid as select * from t_part; Materialized view created. SQL> select * from t_part; C1 C2 C3 SQL> select * from mv_t_part; C1 C2 C3 SQL> alter table t_part truncate partition t_p2; Table truncated. SQL> exec dbms_mview.refresh('mv_t_part','f'); * |
这里出现错误。
ORA-32313 REFRESH FAST of "string"."string" unsupported after PMOPs
Cause: A Partition Maintenance Operation (PMOP) has been performed on a detail table, and the specified materialized view does not support fast refersh after PMOPs.
Action: Use REFRESH COMPLETE. You can determine why your materialized view does not support fast refresh after PMOPs using the DBMS_MVIEW.EXPLAIN_MVIEW() API.
再来测试Oracle10g的:
[oracle@danaly ~]$ sqlplus eygle/eygle SQL*Plus: Release 10.2.0.1.0 - Production on Tue Dec 13 22:10:15 2005 Copyright (c) 1982, 2005, Oracle. All rights reserved.
Table created. SQL> insert into t_part values(1,2,3); 1 row created. SQL> insert into t_part values(1,25,3); 1 row created. SQL> insert into t_part values(1,18,3); 1 row created. SQL> create materialized view log on t_part with rowid; Materialized view log created. SQL> create materialized view mv_t_part refresh with rowid as select * from t_part; Materialized view created. SQL> select * from t_part; C1 C2 C3 SQL> select * from mv_t_part; C1 C2 C3 SQL> alter table t_part truncate partition t_p2; Table truncated. SQL> exec dbms_mview.refresh('mv_t_part','f'); PL/SQL procedure successfully completed. |
看来在物化视图方面,Oracle10g的确已经增强。
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者