Re: New design for FK-based join selectivity estimation - Mailing list pgsql-hackers

From Tom Lane
Subject Re: New design for FK-based join selectivity estimation
Date
Msg-id 22808.1465228764@sss.pgh.pa.us
Whole thread Raw
In response to Re: New design for FK-based join selectivity estimation  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
List pgsql-hackers
Tomas Vondra <tomas.vondra@2ndquadrant.com> writes:
> One of the recent issues with the current design was handling of 
> inheritance / appendrels. ISTM the proposed design has the same issue, 
> no? What happens if the relations are partitioned?

I haven't thought about inheritance in this proposal.  My initial feeling
is that considering the parent table's outgoing FKs (if any) as valid is
not unreasonable.  If it has any, probably all the children do too.
Not sure about incoming FKs, but there probably are none anyhow, since
our implementation doesn't really permit reasonable FK definitions that
reference a partitioned table.  In any case, whatever we might choose
to do differently for inheritance would be no harder in this scheme than
what's there now; plus, whatever it is, we'd do it once not once per join
relation.
        regards, tom lane



pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Prepared statements and generic plans
Next
From: Adam Gomaa
Date:
Subject: Re: Let file_fdw access COPY FROM PROGRAM