Dokumentationen visar "Restriktioner för snabb uppdatering av materialiserade vyer med aggregat" :
Du måste inkludera alla kolumner som används i din MV i loggarna, t.ex.:
CREATE MATERIALIZED VIEW LOG ON MV_LLATTRDATA_PARTITIONED_TEST
WITH ROWID, SEQUENCE(ID, DEFID, ATTRID, VERNUM, DEFVERN) INCLUDING NEW VALUES;
CREATE MATERIALIZED VIEW LOG ON DTREECORE
WITH ROWID, SEQUENCE(DATAID) INCLUDING NEW VALUES;
Sedan kan du skapa MV:
CREATE MATERIALIZED VIEW MV_LLATTRDATA_MAX_VERSIONS
NOLOGGING
BUILD IMMEDIATE
REFRESH FAST ON COMMIT
ENABLE QUERY REWRITE
AS
SELECT AD.DEFID, AD.ATTRID, MAX(AD.VERNUM) AS MAX_VERNUM, MIN(AD.DEFVERN) AS MAX_DEFVERN
FROM MV_LLATTRDATA_PARTITIONED_TEST AD, DTREECORE DT
WHERE AD.ID = DT.DATAID
GROUP BY AD.DEFID, AD.ATTRID;
Materialized view MV_LLATTRDATA_MAX_VERSIONS created.
Inte det mest användbara felmeddelandet...