Re: Clamping reulst row number of joins.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Clamping reulst row number of joins.
Date: 2015-03-06 23:54:56
Message-ID: 22598.1425686096@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> Hm, the problem evidently is that we get a default selectivity estimate
> for the ON condition. I think a proper fix for this would involve
> teaching eqjoinsel (and ideally other join selectivity functions) how
> to drill down into appendrels and combine estimates for the child
> relations.

I wrote a prototype patch for this. The additions to examine_variable()
seem pretty reasonable. However, the only selectivity function I've fixed
is eqjoinsel_inner(). If we do it like this, we're going to need
similar recursive-boilerplate additions in basically every selectivity
function, which seems like a PITA as well as a lot of code bloat.
Can anyone think of a cute way to minimize that overhead?

regards, tom lane

Attachment Content-Type Size
handle-appendrels-in-selectivity-functions-0.1.patch text/x-diff 14.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2015-03-07 00:00:10 Re: MD5 authentication needs help
Previous Message Bruce Momjian 2015-03-06 23:17:20 Re: MD5 authentication needs help