Unexpected Poor Execution Plan When Non-Popular Value Missing from Histogram

(Doc ID 1563752.1)

Last updated on NOVEMBER 04, 2016

Applies to:

Oracle Database - Enterprise Edition - Version to [Release 11.2]
Information in this document applies to any platform.


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


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