Re: Histograms
- From: Wolfgang Breitling <breitliw@xxxxxxxxxxxxx>
- To: john.kanagaraj@xxxxxxx
- Date: Tue, 16 Aug 2005 13:30:43 -0600
John Kanagaraj wrote:
Charlotte,
The broad-brush method has a few problems.
It sure has.
For me histograms are a precision instrument, not a sledgehammer.
I am not sure what happened in the problem Wolfgang mentioned, but it is
possible that one of the above kicked in.
No, bind variable peeking had nothing to do with the problem.
In the strictest sense it wasn't really the CBO's fault but the
gather_table_stats procedures with "... size skewonly" which creates
histograms even for columns with perfectly uniform data distribution or
for columns with a single value for all rows ( is the latter an example
of extremely uniform data distribution or of extremely skewed
distribution? ). In either case the analyze created a frequency
histogram with the density instead of being 1/ndv (i.e. 1 in the case of
the single value column) being 1/(2*num_rows), which lead to incorrectly
low cardinality estimates and using the wrong table as driving table.
--
Regards
Wolfgang Breitling
Centrex Consulting Corporation
www.centrexcc.com
--
//www.freelists.org/webpage/oracle-l
Other related posts: