diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-01-25 23:10:30 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-01-25 23:10:30 +0000 |
commit | 9f5f2124754ccd605671bfe952c220b46a0e730b (patch) | |
tree | e6be6eab43ffe733b9c785d62cec74497098c694 /src/backend/utils/misc/guc.c | |
parent | 15ab7a87206d657a4182d2932970384d540004d0 (diff) |
Allow the planner to collapse explicit inner JOINs together, rather than
necessarily following the JOIN syntax to develop the query plan. The old
behavior is still available by setting GUC variable JOIN_COLLAPSE_LIMIT
to 1. Also create a GUC variable FROM_COLLAPSE_LIMIT to control the
similar decision about when to collapse sub-SELECT lists into their parent
lists. (This behavior existed already, but the limit was always
GEQO_THRESHOLD/2; now it's separately adjustable.)
Diffstat (limited to 'src/backend/utils/misc/guc.c')
-rw-r--r-- | src/backend/utils/misc/guc.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 471d895ea72..9b726dcfe32 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -5,7 +5,7 @@ * command, configuration file, and command line options. * See src/backend/utils/misc/README for more information. * - * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.110 2003/01/10 22:03:29 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.111 2003/01/25 23:10:27 tgl Exp $ * * Copyright 2000 by PostgreSQL Global Development Group * Written by Peter Eisentraut <peter_e@gmx.net>. @@ -37,7 +37,7 @@ #include "optimizer/cost.h" #include "optimizer/geqo.h" #include "optimizer/paths.h" -#include "optimizer/planmain.h" +#include "optimizer/prep.h" #include "parser/parse_expr.h" #include "storage/fd.h" #include "storage/freespace.h" @@ -539,8 +539,16 @@ static struct config_int 10, 1, 1000, NULL, NULL }, { - {"geqo_threshold", PGC_USERSET}, &geqo_rels, - DEFAULT_GEQO_RELS, 2, INT_MAX, NULL, NULL + {"from_collapse_limit", PGC_USERSET}, &from_collapse_limit, + 8, 1, INT_MAX, NULL, NULL + }, + { + {"join_collapse_limit", PGC_USERSET}, &join_collapse_limit, + 8, 1, INT_MAX, NULL, NULL + }, + { + {"geqo_threshold", PGC_USERSET}, &geqo_threshold, + 11, 2, INT_MAX, NULL, NULL }, { {"geqo_pool_size", PGC_USERSET}, &Geqo_pool_size, |