While creating materialized view with on statement I am getting below error.
ORA-32428: on-statement materialized join view error: Shape of MV is not supported 32428. 0000 - "on-statement materialized join view error: %s" *Cause: An error related to on-statement materialized join view was received. *Action: Refer to the error message for more information.
I am using oracle version 21c
Here is what i did
CREATE TABLE "TBL1" (
"COL1" VARCHAR2(20 BYTE),
"COL2" VARCHAR2(20 BYTE),
"COL3" VARCHAR2(20 BYTE),
"COL4" NUMBER
;
create MATERIALIZED view log on tbl1 with rowid;
create materialized view mv3
build DEFERRED
refresh fast with rowid
on statement
enable query rewrite
as
select rowid rid, COL1,COL2 from tbl1;
From the docs
"The base tables referenced in the materialized view’s defining query must be connected in a join graph that uses the star schema or snowflake schema model. The query must contain exactly one centralized fact table and one or more dimension tables, with all pairs of joined tables being related using primary key-foreign key constraints."
eg