My Oracle Support Banner

Query no Longer Rewrites with Simple Materialized View After Upgrade to 12c, When Partitioning Key Includes a CHAR Data Type (Doc ID 2152099.1)

Last updated on FEBRUARY 26, 2019

Applies to:

Oracle Database - Enterprise Edition - Version and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Information in this document applies to any platform.


A simple materialized view, defined as the following, is no longer used for rewrite against a query using the same predicate of 'where FLAG1 = 'S'.  The base table was subpartitioned on the column named "FLAG1", which was a CHAR data type.

create materialized view TEST_MV
select *
from TEST
where FLAG1 = 'S';

After making sure the materialized view was not stale, DBMS_MVIEW.EXPLAIN_REWRITE showed the following reason, which is incorrect:



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

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