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 -> Re: Trying to understand histograms

Re: Trying to understand histograms

From: <BigBoote66_at_hotmail.com>
Date: 19 May 2005 14:24:34 -0700
Message-ID: <1116537874.285532.297390@z14g2000cwz.googlegroups.com>


Thanks for your advice. The question I have about setting up our own histogram is this: Since the histogram implicitly orders the values according to their sorting order (presumably defined by your localization settings), how does one "rig" the histogram to only contain the values one cares about? For example, if your column consists of the numeric values 1 - 4000, and the 400 popular ones are scattered throughout that range, you can't really used the ENDPOINT_VALUE columns to describe this, because all the other values will be adjacent.

If I were able to design a histogram system that used a fixed number of buckets, I would first generate the counts, then order the histogram columns by height, from greatest to least. Then my buckets would report the counts for each of the high values, out to the last few buckets (just like a value-based histogram does). All remaining values would be lumped into the last bucket and assumed to have a uniform distribution among the remaining rows (which would presumably be not so much).

However, to implement such a scheme, I'd need a level of indirection - there would need to be a lookup table that would translate the actual value from the column into it's corresponding bucket location. As far as I know, Oracle's histogram feature doesn't allow this. Received on Thu May 19 2005 - 16:24:34 CDT

Original text of this message

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