From 3969f2924bead7847adbe1fd736eefaf138af942 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 23 Jan 2004 23:54:21 +0000 Subject: 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. --- src/backend/utils/misc/postgresql.conf.sample | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/backend/utils/misc/postgresql.conf.sample') diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index 0fdf6b2e99f..30e7ebe1670 100644 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -122,11 +122,10 @@ # - Genetic Query Optimizer - #geqo = true -#geqo_threshold = 11 -#geqo_pool_size = 0 # default based on tables in statement, - # range 128-1024 -#geqo_generations = 0 # use default: effort * log2(pool_size) -#geqo_effort = 40 # range 1-100 +#geqo_threshold = 12 +#geqo_effort = 5 # range 1-10 +#geqo_pool_size = 0 # selects default based on effort +#geqo_generations = 0 # selects default based on effort #geqo_selection_bias = 2.0 # range 1.5-2.0 # - Other Planner Options - -- cgit v1.2.3