postgresql/src/backend
Tom Lane 899d7b00e9 Further repair of eqjoinsel ndistinct-clamping logic.
Examination of examples provided by Mark Kirkwood and others has convinced
me that actually commit 7f3eba30c9 was quite
a few bricks shy of a load.  The useful part of that patch was clamping
ndistinct for the inner side of a semi or anti join, and the reason why
that's needed is that it's the only way that restriction clauses
eliminating rows from the inner relation can affect the estimated size of
the join result.  I had not clearly understood why the clamping was
appropriate, and so mis-extrapolated to conclude that we should clamp
ndistinct for the outer side too, as well as for both sides of regular
joins.  These latter actions were all wrong, and are reverted with this
patch.  In addition, the clamping logic is now made to affect the behavior
of both paths in eqjoinsel_semi, with or without MCV lists to compare.
When we have MCVs, we suppose that the most common values are the ones
that are most likely to survive the decimation resulting from a lower
restriction clause, so we think of the clamping as eliminating non-MCV
values, or potentially even the least-common MCVs for the inner relation.

Back-patch to 8.4, same as previous fixes in this area.
2011-09-01 00:20:19 -04:00
..
access Fix two ancient bugs in GiST code to re-find a parent after page split: 2011-07-15 11:05:49 +03:00
bootstrap Avoid changing an index's indcheckxmin horizon during REINDEX. 2011-04-19 18:51:08 -04:00
catalog Fix aboriginal copy-paste mistake in error message 2011-06-13 17:54:12 -04:00
commands Fix a missed case in code for "moving average" estimate of reltuples. 2011-08-30 14:50:02 -04:00
executor Avoid integer overflow when LIMIT + OFFSET >= 2^63. 2011-08-02 11:31:15 +03:00
foreign Always pass catalog id to the options validator function specified in 2009-12-23 12:24:16 +00:00
lib Update copyright for 2009. 2009-01-01 17:24:05 +00:00
libpq Use OpenSSL's SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER flag. 2011-07-24 15:18:07 -04:00
main Update copyright for 2009. 2009-01-01 17:24:05 +00:00
nodes Fix performance problem when building a lossy tidbitmap. 2011-08-20 14:51:43 -04:00
optimizer Fix nested PlaceHolderVar expressions that appear only in targetlists. 2011-08-09 00:49:11 -04:00
parser Expose the "*VALUES*" alias that we generate for a stand-alone VALUES list. 2011-06-04 15:48:31 -04:00
po Fixed string in German translation that causes segfault. 2011-06-20 13:58:03 +02:00
port Modernize dlopen interface code for FreeBSD and OpenBSD. 2011-04-07 15:14:51 -04:00
postmaster Fix VACUUM so that it always updates pg_class.reltuples/relpages. 2011-05-30 17:07:19 -04:00
regex Change regexp engine's ccondissect/crevdissect routines to perform DFA 2010-02-01 02:45:35 +00:00
rewrite Make FOR UPDATE/SHARE in the primary query not propagate into WITH queries; 2009-10-27 17:11:30 +00:00
snowball Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:08 +02:00
storage Don't throw a warning if vacuum sees PD_ALL_VISIBLE flag set on a page that 2011-03-08 20:30:09 +02:00
tcop On IA64 architecture, we check the depth of the register stack in addition 2011-04-13 11:53:06 +03:00
tsearch Fix tsmatchsel() to account properly for null rows. 2011-02-17 19:01:01 -05:00
utils Further repair of eqjoinsel ndistinct-clamping logic. 2011-09-01 00:20:19 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:08 +02:00
common.mk Code coverage testing with gcov. Documentation is in the regression test 2008-09-05 12:11:18 +00:00
Makefile Well, the systemtap guys moved the goalposts again: with the latest version, 2010-01-20 23:12:15 +00:00
nls.mk Translation updates for 8.4.5 2010-09-30 23:31:19 +03:00