Question: I have a situation whereby the
cardinality of a query requires the addition of a new bucket to an existing
Oracle frequency histogram, when dbms_stats does not catch an important
transient histogram value. How can I "hack" into a histogram and add an
entry into a frequency histogram?
Answer: While the dbms_stats
utility has no method for modifying existing histograms,
Oracle guru Carlos Sierra of Oracle Corporation describes a utility that will
add to a histogram:
"You can also use the
undocumented module SQLT XGRAM which is located under the
sqlt/utl directory. Just download sqlt.zip from MOSC Doc:
There is no need to install SQLT to use
this XGRAM module.
You can add a bucket to a
frequency histogram with it. The XGRAM module allows you
perform several other operations and it uses dbms_stats
Get the Complete
Oracle SQL Tuning Information
The landmark book
SQL Tuning The Definitive Reference" is
filled with valuable information on Oracle SQL Tuning.
This book includes scripts and tools to hypercharge Oracle 11g
performance and you can
for 30% off directly from the publisher.