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 JUNE 21, 2016

Applies to:

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

Symptoms

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
as
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:

 

Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms