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

2017-07-25 Thread Tom Lane
Alexey Bashtanov 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

[HACKERS] estimation for join results cardinality is sometimes more than the product of the downstream nodes'

2017-07-25 Thread Alexey Bashtanov
Hello, Postgres can produce a plan with a nested loop node having rows estimate much more than the product of underlying nodes' estimates, relying only on outer relation size: alexey=# explain SELECT oid, relname FROM ( SELECT m.oid, m.relname FROM pg_class m UNION ALL