Re: Correlation in cost_index() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Correlation in cost_index()
Date
Msg-id 29249.1060371170@sss.pgh.pa.us
Whole thread Raw
In response to Re: Correlation in cost_index()  (Sean Chittenden <sean@chittenden.org>)
Responses Re: Correlation in cost_index()
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: "Jenny -"
Date:
Subject: session level locks
Next
From: Alvaro Herrera
Date:
Subject: Re: LOCK.tag(figuring out granularity of lock)