postgresql/src
Tom Lane f343a880d5 Extract restriction OR clauses whether or not they are indexable.
It's possible to extract a restriction OR clause from a join clause that
has the form of an OR-of-ANDs, if each sub-AND includes a clause that
mentions only one specific relation.  While PG has been aware of that idea
for many years, the code previously only did it if it could extract an
indexable OR clause.  On reflection, though, that seems a silly limitation:
adding a restriction clause can be a win by reducing the number of rows
that have to be filtered at the join step, even if we have to test the
clause as a plain filter clause during the scan.  This should be especially
useful for foreign tables, where the change can cut the number of rows that
have to be retrieved from the foreign server; but testing shows it can win
even on local tables.  Per a suggestion from Robert Haas.

As a heuristic, I made the code accept an extracted restriction clause
if its estimated selectivity is less than 0.9, which will probably result
in accepting extracted clauses just about always.  We might need to tweak
that later based on experience.

Since the code no longer has even a weak connection to Path creation,
remove orindxpath.c and create a new file optimizer/util/orclauses.c.

There's some additional janitorial cleanup of now-dead code that needs
to happen, but it seems like that's a fit subject for a separate commit.
2013-12-30 12:24:37 -05:00
..
backend Extract restriction OR clauses whether or not they are indexable. 2013-12-30 12:24:37 -05:00
bin Don't attempt to limit target database for pg_restore. 2013-12-29 15:17:52 -06:00
common Use improved vsnprintf calling logic in more places. 2013-10-24 21:43:57 -04:00
include Extract restriction OR clauses whether or not they are indexable. 2013-12-30 12:24:37 -05:00
interfaces C comment: again update comment for pg_fe_sendauth for error cases 2013-12-03 11:42:18 -05:00
makefiles Remove leftovers of IRIX port 2013-11-12 06:39:36 -05:00
pl Change the way we mark tuples as frozen. 2013-12-22 15:49:09 -05:00
port Fix whitespace 2013-12-27 19:51:49 -05:00
template Remove leftovers of IRIX port 2013-11-12 06:39:36 -05:00
test Extract restriction OR clauses whether or not they are indexable. 2013-12-30 12:24:37 -05:00
timezone Update time zone data files to tzdata release 2013h. 2013-12-01 14:11:44 -05:00
tools pg_prewarm, a contrib module for prewarming relationd data. 2013-12-20 08:14:13 -05:00
tutorial Modernize string literal syntax in tutorial example. 2013-01-19 17:20:32 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +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 Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in build: pass EXTRA_REGRESS_OPTS to secondary regression tests 2013-12-04 10:14:45 -05:00
Makefile.shlib Remove IRIX port. 2013-10-18 08:14:21 -04:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
nls-global.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00