Re: estimation for join results cardinality is sometimes more than the product of the downstream nodes'

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alexey Bashtanov <bashtanov(at)imap(dot)cc>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: estimation for join results cardinality is sometimes more than the product of the downstream nodes'
Date: 2017-07-25 14:41:32
Message-ID: 5897.1500993692@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alexey Bashtanov <bashtanov(at)imap(dot)cc> writes:
> Is there a reason that join cardinality estimates are not limited by the
> product of the joined parts cardinalities like in the
> join-card-est.patch attached?

Because that would be giving an unfair advantage to some paths over
others based on nothing except estimation errors. I do not think we'd
get a net benefit in plan quality.

If we could do this earlier and adjust the join relation's overall
cardinality estimate, it might be something to consider.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2017-07-25 14:50:08 Re: Testlib.pm vs msys
Previous Message Tom Lane 2017-07-25 14:38:02 Re: pl/perl extension fails on Windows