Gregory Stark <[EMAIL PROTECTED]> writes:
> "Tom Lane" <[EMAIL PROTECTED]> writes:
>> How so? The entries in the histogram are equidistant by definition.

## Advertising

> Huh? They have equal number of values between them, they're not equidistant in
> the scalar space. So the area of each bar should be the same but the width
> would be proportional to the width of the bucket and the height inversely
> proportional.
You're presuming there exists a linear scalar space to reference the
results to. I'm unconvinced that that's a good assumption to make.
Consider for instance a column of URLs; practically all the entries will
start with http or ftp or one of a small number of other possibilities.
If you try to represent this with some hypothetical linear x-axis you
are going to produce an unusable display.
convert_to_scalar partially avoids this problem because of the way it's
used within the backend: we don't actually assume that there is any
global linear space, only that the values within any single histogram
bucket are fairly uniformly distributed. (This assumption tends to
become true in the limit as the buckets get smaller, even if the global
distribution is pretty crazy. And even if it doesn't become true, the
absolute error is bounded by the bucket size.) You can't use the thing
to measure the "positions" of histogram boundary values, because those
are part of its frame of reference not something it outputs.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster