Re: Stats for multi-column indexes - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Stats for multi-column indexes
Date
Msg-id 15589.1174412946@sss.pgh.pa.us
Whole thread Raw
In response to Re: Stats for multi-column indexes  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
Josh Berkus <josh@agliodbs.com> writes:
>> Actually, I think you don't particularly need stats for that in most
>> cases --- if the planner simply took note that the FK relationship
>> exists, it would know that each row of the FK side joins to exactly
>> one row of the PK side, which in typical cases is sufficient.

> Is it?  What about the other direction?

I recall that we had decided at the Greenplum meeting last year that
we could use a better heuristic if we noted that a join was being done
on an FK-and-PK combination, but I don't recall the details right at
the moment.  Did anyone take notes?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Stats for multi-column indexes
Next
From: Benjamin Arai
Date:
Subject: SoC Ideas for people looking for projects