> mergejoinscansel doesn't currently try to fix up the histogram bounds by
> consulting indexes. At the time I was afraid of the costs of doing
> that, and I still am; but it would be a way to address this issue.
>
Another cheaper but less accurate way to deal with this is to note
that we are trying to estimate the max of the population by using the
max of the sample, which obviously has a negative bias. If we could
correct the bias ( though the bootstrap, or an analytical correction
under some parametric assumptions ( ie, the distribution is uniform in
the last bucket ) ) , then we should get better estimates at the cost
of some analyze time. But this wouldn't even deal with Josh's
particular problem, since it's due to out of date stats rather than
sampling error...
-Nathan