Why DBMS_STATS with METHOD_OPT=>'FOR ALL COLUMNS SIZE SKEWONLY' Gathers Histograms on Unique Key Columns
(Doc ID 1473023.1)
Last updated on FEBRUARY 21, 2019
Applies to:Oracle Database - Enterprise Edition - Version 126.96.36.199 and later
Oracle Database - Personal Edition - Version 188.8.131.52 and later
Oracle Database - Standard Edition - Version 184.108.40.206 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Information in this document applies to any platform.
Why are column statistics gathered for a Unique or Primary Key column?
How can a Unique column's data be non-uniformly distributed?
Gathering stats with METHOD_OPT=>'FOR ALL COLUMNS SIZE SKEWONLY' generates histogram for unique key/Primary key columns.
This may appear to contradict with what is mentioned in documentation, as per documentation SKEWONLY--Oracle determines the columns to collect histograms based on the data distribution of the columns.
Gather stats for a table using the below commands
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