aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2011-08-31 16:04:48 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2011-08-31 16:05:43 -0400
commit97930cf578e28c01f67fe4006ffcdbb5aedf18c2 (patch)
tree440c121a7408e8f2f3521d621a9b5187d36639ed /src/backend/access/gist
parent5cfe33fe7bb5f5a29e9c2f6780c8278b8a7e5735 (diff)
downloadpostgresql-97930cf578e28c01f67fe4006ffcdbb5aedf18c2.tar.gz
postgresql-97930cf578e28c01f67fe4006ffcdbb5aedf18c2.zip
Improve eqjoinsel's ndistinct clamping to work for multiple levels of join.
This patch fixes an oversight in my commit 7f3eba30c9d622d1981b1368f2d79ba0999cdff2 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.
Diffstat (limited to 'src/backend/access/gist')
0 files changed, 0 insertions, 0 deletions