Revise GEQO planner to make use of some heuristic knowledge about SQL, namely
authorTom Lane <[email protected]>
Fri, 23 Jan 2004 23:54:21 +0000 (23:54 +0000)
committerTom Lane <[email protected]>
Fri, 23 Jan 2004 23:54:21 +0000 (23:54 +0000)
commit3969f2924bead7847adbe1fd736eefaf138af942
tree81bf0fa12a7c80a15b4a94e051b1e576aa3c7b4f
parent81c554bbe8303d0c554430cbcd4a7804d85ddd24
Revise GEQO planner to make use of some heuristic knowledge about SQL, namely
that it's good to join where there are join clauses rather than where there
are not.  Also enable it to generate bushy plans at need, so that it doesn't
fail in the presence of multiple IN clauses containing sub-joins.  These
changes appear to improve the behavior enough that we can substantially reduce
the default pool size and generations count, thereby decreasing the runtime,
and yet get as good or better plans as we were getting in 7.4.  Consequently,
adjust the default GEQO parameters.  I also modified the way geqo_effort is
used so that it affects both population size and number of generations;
it's now useful as a single control to adjust the GEQO runtime-vs-plan-quality
tradeoff.  Bump geqo_threshold to 12, since even with these changes GEQO
seems to be slower than the regular planner at 11 relations.
doc/src/sgml/runtime.sgml
src/backend/optimizer/geqo/geqo_eval.c
src/backend/optimizer/geqo/geqo_main.c
src/backend/optimizer/geqo/geqo_pool.c
src/backend/optimizer/geqo/geqo_recombination.c
src/backend/utils/misc/guc.c
src/backend/utils/misc/postgresql.conf.sample
src/include/optimizer/geqo.h
src/include/optimizer/geqo_pool.h