De documentatie toont "Beperkingen op snel vernieuwen op gematerialiseerde weergaven met aggregaten" :
U moet alle kolommen die in uw MV worden gebruikt in de logs opnemen, bijvoorbeeld:
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;
Vervolgens kunt u de MV maken:
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.
Niet de meest nuttige foutmelding...