postgresql/src/include/optimizer
Tom Lane 7643bed58e When using extended-query protocol, postpone planning of unnamed statements
until Bind is received, so that actual parameter values are visible to the
planner.  Make use of the parameter values for estimation purposes (but
don't fold them into the actual plan).  This buys back most of the
potential loss of plan quality that ensues from using out-of-line
parameters instead of putting literal values right into the query text.

This patch creates a notion of constant-folding expressions 'for
estimation purposes only', in which case we can be more aggressive than
the normal eval_const_expressions() logic can be.  Right now the only
difference in behavior is inserting bound values for Params, but it will
be interesting to look at other possibilities.  One that we've seen
come up repeatedly is reducing now() and related functions to current
values, so that queries like ... WHERE timestampcol > now() - '1 day'
have some chance of being planned effectively.

Oliver Jowett, with some kibitzing from Tom Lane.
2004-06-11 01:09:22 +00:00
..
clauses.h When using extended-query protocol, postpone planning of unnamed statements 2004-06-11 01:09:22 +00:00
cost.h Add the ability to extract OR indexscan conditions from OR-of-AND 2004-01-05 05:07:36 +00:00
geqo_copy.h make sure the $Id tags are converted to $PostgreSQL as well ... 2003-11-29 22:41:33 +00:00
geqo_gene.h make sure the $Id tags are converted to $PostgreSQL as well ... 2003-11-29 22:41:33 +00:00
geqo_misc.h make sure the $Id tags are converted to $PostgreSQL as well ... 2003-11-29 22:41:33 +00:00
geqo_mutation.h make sure the $Id tags are converted to $PostgreSQL as well ... 2003-11-29 22:41:33 +00:00
geqo_pool.h Revise GEQO planner to make use of some heuristic knowledge about SQL, namely 2004-01-23 23:54:21 +00:00
geqo_random.h make sure the $Id tags are converted to $PostgreSQL as well ... 2003-11-29 22:41:33 +00:00
geqo_recombination.h make sure the $Id tags are converted to $PostgreSQL as well ... 2003-11-29 22:41:33 +00:00
geqo_selection.h make sure the $Id tags are converted to $PostgreSQL as well ... 2003-11-29 22:41:33 +00:00
geqo.h Revise GEQO planner to make use of some heuristic knowledge about SQL, namely 2004-01-23 23:54:21 +00:00
joininfo.h make sure the $Id tags are converted to $PostgreSQL as well ... 2003-11-29 22:41:33 +00:00
pathnode.h Make use of statistics on index expressions. There are still some 2004-02-17 00:52:53 +00:00
paths.h Adjust indexscan planning logic to keep RestrictInfo nodes associated 2004-01-05 23:39:54 +00:00
plancat.h make sure the $Id tags are converted to $PostgreSQL as well ... 2003-11-29 22:41:33 +00:00
planmain.h When testing whether a sub-plan can do projection, use a general-purpose 2004-01-18 00:50:03 +00:00
planner.h When using extended-query protocol, postpone planning of unnamed statements 2004-06-11 01:09:22 +00:00
prep.h Extend set-operation planning to keep track of the sort ordering induced 2004-04-07 18:17:25 +00:00
restrictinfo.h Adjust indexscan planning logic to keep RestrictInfo nodes associated 2004-01-05 23:39:54 +00:00
subselect.h make sure the $Id tags are converted to $PostgreSQL as well ... 2003-11-29 22:41:33 +00:00
tlist.h make sure the $Id tags are converted to $PostgreSQL as well ... 2003-11-29 22:41:33 +00:00
var.h Promote row expressions to full-fledged citizens of the expression syntax, 2004-05-10 22:44:49 +00:00