我尝试使用此语法在预构建的表上创建物化视图
CREATE MATERIALIZED VIEW "STORE"
ON PREBUILT TABLE
WITH REDUCED PRECISION
REFRESH FORCE ON DEMAND
START WITH SYSDATE+4/1440
NEXT SYSDATE + 1/24
USING DEFAULT LOCAL ROLLBACK SEGMENT
DISABLE QUERY REWRITE
AS
(
(SELECT
t1.field1
t1.field2
t1.field3
t3.LAT AS LAT,
t3.LNG AS LNG,
t4.ID AS T4_ID
FROM T1@STORE_DBLINK t1
INNER JOIN T4 t4 ON t1.T4_ID = t4.ID
LEFT JOIN T3@STORE_DBLINK t3 ON t3.STORE_NUMBER = t1.NUMBER
WHERE ((t1.id = (
SELECT MAX(t2.id)
FROM T2@STORE_DBLINK t2
WHERE t2.number=t1.number
))
))
UNION
(SELECT te.field1,
te.field2,
te.field3,
te.LAT LAT,
te.LNG LNG,
te.T4_ID
FROM STORE_TMP te
WHERE STORE_NUMBER not in (select DISTINCT NUMBER from T1S@STORE_DBLINK)));
此查询正确创建物化视图。但是,当我"编辑"通过SqlDeveloper的物化视图禁用刷新周期,回滚段显示为"未指定"。
此外,如果我尝试更改刷新"按需"到下一次刷新的时间段,它完成了更改。如果我执行:
,会发生同样的事情ALTER MATERIALIZED VIEW STORE
REFRESH FORCE
START WITH SYSDATE+4/1440
NEXT SYSDATE+1/24;
也许这是因为我使用的是复杂的物化视图?有办法解决这个问题吗?
提前致谢。