My Oracle Support Banner

Unexpected Poor Execution Plan When Non-Popular Value Missing from Histogram (Doc ID 1563752.1)

Last updated on NOVEMBER 07, 2023

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.1 to 11.2.0.4 [Release 11.2]
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Information in this document applies to any platform.

Symptoms

A poor plan is chosen for predicates on certain columns.
For example, the majority of the time, the CBO chooses an INDEX UNIQUE SCAN on a primary key index, but for certain column values it will choose a less efficient INDEX RANGE SCAN on another index which contains the same leading columns contained within the primary key index.

SQLT report shows in Observation Section:

Frequency histogram with number of buckets not matching the number of distinct values.

 

10053 trace will show:

Note: Buckets (Number of histograms) is less than NDV(Number of Distinct Values) for Frequency Histogram

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
References


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