My Oracle Support Banner

Can Not Create Materialized View (Doc ID 393708.1)

Last updated on NOVEMBER 07, 2023

Applies to:

Oracle Database - Enterprise Edition - Version 9.2.0.5 and later
Information in this document applies to any platform.

Symptoms

NOTE: In the images and/or the document content below, the user information and data used represents fictitious data from the Oracle sample schema(s) or Public Documentation delivered with an Oracle database product.  Any similarity to actual persons, living or dead, is purely coincidental and not intended in any manner.

CREATE MATERIALIZED VIEW statement hangs and does not end.

CREATE MATERIALIZED VIEW user_name.mview_name TABLESPACE tablespace_name
NOCACHE
NOLOGGING
NOPARALLEL
BUILD IMMEDIATE
REFRESH FORCE ON DEMAND
WITH PRIMARY KEY
AS
SELECT /*+ INDEX(A IND1) */ a.column1 ,a.column2, UPPER(a.column3) column3 FROM table_name A
WHERE rowid in (SELECT max(rowid) FROM table_name b WHERE B.column1 = A.column1 and B.column2 = A.column2);

- CTAS does works and get not hanged
- INSERT AS SELECT does not hang
- Problem reproduces even without hint.
- Creating a dummy materialized view does work.

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.