postgresql/src
Tom Lane 732bfa2448 Fix cost estimation for indexscan filter conditions.
cost_index's method for estimating per-tuple costs of evaluating filter
conditions (a/k/a qpquals) was completely wrong in the presence of derived
indexable conditions, such as range conditions derived from a LIKE clause.
This was largely masked in common cases as a result of all simple operator
clauses having about the same costs, but it could show up in a big way when
dealing with functional indexes containing expensive functions, as seen for
example in bug #6579 from Istvan Endredy.  Rejigger the calculation to give
sane answers when the indexquals aren't a subset of the baserestrictinfo
list.  As a side benefit, we now do the calculation properly for cases
involving join clauses (ie, parameterized indexscans), which we always
overestimated before.

There are still cases where this is an oversimplification, such as clauses
that can be dropped because they are implied by a partial index's
predicate.  But we've never accounted for that in cost estimates before,
and I'm not convinced it's worth the cycles to try to do so.
2012-04-11 20:24:17 -04:00
..
backend Fix cost estimation for indexscan filter conditions. 2012-04-11 20:24:17 -04:00
bin psql: Improve tab completion of WITH 2012-04-10 20:35:39 +03:00
include Do stack-depth checking in all postmaster children. 2012-04-08 19:07:55 +03:00
interfaces Accept postgres:// URIs in libpq connection functions 2012-04-11 04:33:51 -03:00
makefiles pgxs: Supply default values for BISON and FLEX variables 2012-03-30 20:36:49 +03:00
pl Fix plpgsql named-cursor-parameter feature for variable name conflicts. 2012-04-04 21:50:31 -04:00
port Remove now redundant pgpipe code. 2012-03-28 23:24:07 -04:00
template Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
test Silently ignore any nonexistent schemas that are listed in search_path. 2012-04-11 12:02:50 -04:00
timezone Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
tools Remove now redundant pgpipe code. 2012-03-28 23:24:07 -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 ecpg: Improve test building 2012-02-02 20:33:29 +02:00
Makefile.shlib Use single quotes in preference to double quotes for protecting pathnames. 2011-06-15 21:45:23 -04:00
nls-global.mk NLS: Initialize Project-Id-Version field by xgettext 2012-04-10 21:26:17 +03:00
win32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00