mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-08 00:49:26 +02:00
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. |
||
---|---|---|
.. | ||
clauses.h | ||
cost.h | ||
geqo_copy.h | ||
geqo_gene.h | ||
geqo_misc.h | ||
geqo_mutation.h | ||
geqo_pool.h | ||
geqo_random.h | ||
geqo_recombination.h | ||
geqo_selection.h | ||
geqo.h | ||
joininfo.h | ||
pathnode.h | ||
paths.h | ||
plancat.h | ||
planmain.h | ||
planner.h | ||
prep.h | ||
restrictinfo.h | ||
subselect.h | ||
tlist.h | ||
var.h |