Sean Chittenden <sean@chittenden.org> writes:
> Which suggests to me that line 3964 in
> ./src/backend/utils/adt/selfuncs.c isn't right for multi-column
> indexes, esp for indexes that are clustered. I don't know how to
> address this though... Tom, any hints?
Yes, we knew that already. Oliver had suggested simply dropping the
division by nKeys, thus pretending that the first-column correlation
is close enough. That seems to me to be going too far in the other
direction, but clearly dividing by nKeys is far too pessimistic.
I'd change this in a moment if someone could point me to a formula
with any basis at all ...
regards, tom lane