postgresql/src/backend/utils
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
..
adt Improve eqjoinsel's ndistinct clamping to work for multiple levels of join. 2011-08-31 16:06:00 -04:00
cache Fix a missed case in code for "moving average" estimate of reltuples. 2011-08-30 14:49:52 -04:00
error Reduce PG_SYSLOG_LIMIT to 900 bytes. 2011-08-05 21:02:52 -04:00
fmgr Replace errdetail("%s", ...) with errdetail_internal("%s", ...). 2011-07-16 14:22:35 -04:00
hash Fix the size of predicate lock manager's shared memory hash tables at creation. 2011-04-11 13:43:31 +03:00
init Fix incorrect timeout handling during initial authentication transaction. 2011-08-13 17:52:41 -04:00
mb Fix char2wchar/wchar2char to support collations properly. 2011-04-23 12:35:41 -04:00
misc Revert "Tweak postgresql.conf.sample's comments on listen_addresess." 2011-08-25 09:41:00 -04:00
mmgr Cleanup for pull-up-isReset patch. 2011-05-24 17:57:32 -04:00
resowner pgindent run before PG 9.1 beta 1. 2011-04-10 11:42:00 -04:00
sort Fix failure to account for memory used by tuplestore_putvalues(). 2011-06-15 14:05:39 -04:00
time Remove special case for xmin == xmax in HeapTupleSatisfiesVacuum(). 2011-04-29 16:29:42 -04:00
.gitignore Avoid maintaining three separate copies of the error codes list. 2011-02-03 22:32:49 -05:00
errcodes.txt Per-column collation support 2011-02-08 23:04:18 +02:00
Gen_dummy_probes.sed Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
Gen_fmgrtab.pl Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
generate-errcodes.pl Avoid maintaining three separate copies of the error codes list. 2011-02-03 22:32:49 -05:00
Makefile Make handling of errcodes.h more consistent with other generated headers. 2011-02-04 09:29:10 -05:00
probes.d Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00