Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> What does the optimizer do with a 2-bucket histogram ?

What does the optimizer do with a 2-bucket histogram ?

From: Spendius <spendius_at_muchomail.com>
Date: 8 Mar 2006 06:55:45 -0800
Message-ID: <1141829745.668137.166710@i40g2000cwc.googlegroups.com>


Hi,
I've noticed a colleague computes histograms in a schema against all indexed columns of this schema's tables, with no regard as to whether it's relevant or not (they're computed on unique values as well), and with only 2 buckets everywhere. For columns with values where it would be pertinent to have much more buckets (skewed breakdown of values where no bind variables are used in queries) what the heck can the optimizer do with only 2-bucket histograms to estimate the cost of queries involving these columns ? Is it of any use ?
And how would you reckon the proper number of buckets to create in a histogram on a given column ?

I'm talking about 8i and 9i databases, and when I select from DBA_HISTOGRAMS for a specified column I only get things looking like:
ENDPOINT_NUMBER ENDPOINT_VALUE ENDPOINT_ACTUAL_VALUE

--------------- -------------- ---------------------
              0           4011
              1        6427950

Thanks. Received on Wed Mar 08 2006 - 08:55:45 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US