postgresql/src
Tom Lane 4e54ae66a5 Rethink heuristics for choosing index quals for parameterized paths.
Some experimentation with examples similar to bug #7539 has convinced me
that indxpath.c's original implementation of parameterized-path generation
was several bricks shy of a load.  In general, if we are relying on a
particular outer rel or set of outer rels for a parameterized path, the
path should use every indexable join clause that's available from that rel
or rels.  Any join clauses that get left out of the indexqual will end up
getting applied as plain filter quals (qpquals), and that's generally a
significant loser compared to having the index AM enforce them.  (This is
particularly true with btree, which can skip the index scan entirely if
it can see that the given indexquals are mutually contradictory.)  The
original heuristics failed to ensure this, though, and were overly
complicated anyway.  Rewrite to make the code explicitly identify each
useful set of outer rels and then select all applicable join clauses for
each one.  The one plan that changes in the regression tests is in fact
for the better according to the planner's cost estimates.

(Note: this is not a correctness issue but just a matter of plan quality.
I don't yet know what is going on in bug #7539, but I don't expect this
change to fix that.)
2012-09-16 17:58:21 -04:00
..
backend Rethink heuristics for choosing index quals for parameterized paths. 2012-09-16 17:58:21 -04:00
bin Fix "too many arguments" messages not to index off the end of argv[]. 2012-09-06 15:52:19 -04:00
include Fix a couple other leftover uses of 'conisonly' terminology. 2012-09-12 15:12:43 -04:00
interfaces Use .NOTPARALLEL in ecpg/Makefile to avoid a gmake parallelism bug. 2012-09-09 15:09:04 -04:00
makefiles Remove BSD/OS (BSDi) port. There are no known users upgrading to 2012-05-03 10:58:44 -04:00
pl Back-patch fix and test case for bug #7516. 2012-09-14 11:50:02 -04:00
port Fix typo in comment for pclose_check() function. 2012-09-12 22:33:30 -05:00
template Remove BSD/OS (BSDi) port. There are no known users upgrading to 2012-05-03 10:58:44 -04:00
test Rethink heuristics for choosing index quals for parameterized paths. 2012-09-16 17:58:21 -04:00
timezone Update time zone data files to tzdata release 2012e. 2012-08-14 10:54:30 -04:00
tools Add vcregress.pl target for checking pg_upgrade. 2012-09-10 12:51:24 -04:00
tutorial Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Fix some oversights in distprep and maintainer-clean targets. 2011-03-10 00:04:05 -05:00
Makefile.global.in Fix pg_config.h make rule 2012-05-07 21:28:38 +03:00
Makefile.shlib Remove BSD/OS (BSDi) port. There are no known users upgrading to 2012-05-03 10:58:44 -04:00
nls-global.mk Lots of doc corrections. 2012-04-23 22:43:09 -04:00
win32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00