物化视图-Oracle/数据未更新 [英] Materialized View - Oracle / Data is not updating
问题描述
我的朋友创建了一个物化视图,但该视图未从Mater Table接收新数据.该视图仅在创建时接收数据,之后不包括新闻数据.
My friend has created a materialized view but the View does not receive new data from Mater Table. The view is receiving data only in creation, after it the news data are not included.
任何人都可以帮助我解决此问题吗?
Anyone can help me to resolve this issue?
在我的物化视图下面放松.
Fallow below my materialized view.
CREATE or REPLACE MATERIALIZED VIEW DATABASE.MyMatView
LOGGING
TABLESPACE SDBANCO
PCTFREE 10
INITRANS 2
STORAGE
(
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS UNLIMITED
BUFFER_POOL DEFAULT
)
NOCOMPRESS
NOCACHE
NOPARALLEL
REFRESH ON DEMAND
FORCE
DISABLE QUERY REWRITE
AS
SELECT * FROM .....
谢谢
Matheus Lozano
Matheus Lozano
推荐答案
如果要自动刷新实例化视图,则应使用 ON COMMIT 刷新方法.由于您已指定按需刷新,因此必须使用DBMS_MVIEW.REFRESH方法手动刷新实例化视图.
If you want the materialized view to be refreshed automatically you should use ON COMMIT refresh method. Since you have specified an ON DEMAND refresh you will have to manually refresh the materialized view using DBMS_MVIEW.REFRESH method.
刷新实体化视图有很多注意事项.我建议您阅读以下Oracle文档.
There are lot of considerations for refreshing a materialized view. I would recommend that you read the following Oracle documentation.
https://docs.oracle.com/database/121/DWHSG/refresh.htm#DWHSG8360
这篇关于物化视图-Oracle/数据未更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!