Materialized View Gives Less Number of Records than its Select Query After a Complete Refresh

(Doc ID 1515095.1)

Last updated on JANUARY 18, 2017

Applies to:

Oracle Server - Enterprise Edition - Version 11.2.0.3 and later
Information in this document applies to any platform.
This is an issue specific to MVIEW containing join conditions.

Symptoms

Wrong result from mview containing joins after complete refresh.

Example of such a select query for reference:

SELECT *
FROM TEST_JMA1 P
WHERE NOT EXISTS
(SELECT NULL
FROM COMPANIES_MAPPINGS CM
WHERE CM.COMPANY_TYPES_ID = 1
AND CM.DELETED = 'N'
AND ( CM.COMPANIES_ID_1 = P.COMPANIES_ID
OR CM.COMPANIES_ID_2 = P.COMPANIES_ID));

Changes

 This is identified during the upgrade process from 10.2.0.5 to 11.2.0.3.

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