Re: New design for FK-based join selectivity estimation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: New design for FK-based join selectivity estimation
Date: 2016-06-06 15:59:24
Message-ID: 22808.1465228764@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Adam Gomaa 2016-06-06 16:08:25 Re: Let file_fdw access COPY FROM PROGRAM
Previous Message David G. Johnston 2016-06-06 15:57:41 Re: Prepared statements and generic plans