1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00
Files
postgres/src/backend
Tom Lane ca4f70ca77 Improve eqjoinsel's ndistinct clamping to work for multiple levels of join.
This patch fixes an oversight in my commit
7f3eba30c9 of 2008-10-23.  That patch
accounted for baserel restriction clauses that reduced the number of rows
coming out of a table (and hence the number of possibly-distinct values of
a join variable), but not for join restriction clauses that might have been
applied at a lower level of join.  To account for the latter, look up the
sizes of the min_lefthand and min_righthand inputs of the current join,
and clamp with those in the same way as for the base relations.

Noted while investigating a complaint from Ben Chobot, although this in
itself doesn't seem to explain his report.

Back-patch to 8.4; previous versions used different estimation methods
for which this heuristic isn't relevant.
2011-08-31 16:06:00 -04:00
..
2011-06-19 00:39:19 +03:00
2011-01-01 13:18:15 -05:00
2011-06-09 14:32:50 -04:00
2011-08-17 14:02:49 +03:00
2011-06-09 14:32:50 -04:00
2011-01-01 13:18:15 -05:00
2011-06-09 14:32:50 -04:00
2011-06-09 23:02:48 +03:00