The frontend may be initialized by setting PGGEQO
environment variable.
-
-
-
-
-
- R_PLANS
-
-
- Determines whether right-hand plan evaluation is allowed:
-
-
-
-
-
- On
-
-
- enables right-hand evaluation of plans.
-
-
-
-
-
-
- Off
-
-
- disables right-hand evaluation of plans.
-
-
-
-
-
-
- DEFAULT
-
-
- Equivalent to specifying SET R_PLANS='off'.
-
-
-
-
-
-
-
It may be useful when joining big relations with
small ones. This algorithm is off by default.
It's not used by GEQO anyway.
-
- The frontend may be initialized by setting the PGRPLANS
- environment variable.
+
It's not used by GEQO anyway.
- The frontend may be initialized by setting the PGRPLANS
+ The frontend may be initialized by setting the PGKSQO
environment variable.
--
SET GEQO = DEFAULT;
- --Turn on right-hand evaluation of plans:
- --
- SET R_PLANS TO 'on';
-
--set the timezone for Berkeley, California:
SET TIME ZONE 'PST8PDT';
* Routines for handling of 'SET var TO',
* 'SHOW var' and 'RESET var' statements.
*
- * $Id: variable.c,v 1.18 1998/12/18 09:10:20 vadim Exp $
+ * $Id: variable.c,v 1.19 1999/02/18 06:00:44 momjian Exp $
*
*/
static bool show_cost_index(void);
static bool reset_cost_index(void);
static bool parse_cost_index(const char *);
-static bool show_r_plans(void);
-static bool reset_r_plans(void);
-static bool parse_r_plans(const char *);
static bool reset_geqo(void);
static bool show_geqo(void);
static bool parse_geqo(const char *);
extern Cost _cpu_index_page_wight_;
extern bool _use_geqo_;
extern int32 _use_geqo_rels_;
-extern bool _use_right_sided_plans_;
extern bool _use_keyset_query_optimizer;
/*
return TRUE;
}
-/*
- *
- * R_PLANS
- *
- */
-static bool
-parse_r_plans(const char *value)
-{
- if (value == NULL)
- {
- reset_r_plans();
- return TRUE;
- }
-
- if (strcasecmp(value, "on") == 0)
- _use_right_sided_plans_ = true;
- else if (strcasecmp(value, "off") == 0)
- _use_right_sided_plans_ = false;
- else
- elog(ERROR, "Bad value for Right-sided Plans (%s)", value);
-
- return TRUE;
-}
-
-static bool
-show_r_plans()
-{
-
- if (_use_right_sided_plans_)
- elog(NOTICE, "Right-sided Plans are ON");
- else
- elog(NOTICE, "Right-sided Plans are OFF");
- return TRUE;
-}
-
-static bool
-reset_r_plans()
-{
-
-#ifdef USE_RIGHT_SIDED_PLANS
- _use_right_sided_plans_ = true;
-#else
- _use_right_sided_plans_ = false;
-#endif
- return TRUE;
-}
-
/*
*
* COST_HEAP
{
"geqo", parse_geqo, show_geqo, reset_geqo
},
- {
- "r_plans", parse_r_plans, show_r_plans, reset_r_plans
- },
#ifdef MULTIBYTE
{
"client_encoding", parse_client_encoding, show_client_encoding, reset_client_encoding
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.29 1999/02/18 05:26:19 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.30 1999/02/18 06:00:46 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "optimizer/joininfo.h"
#include "optimizer/pathnode.h"
-#ifdef USE_RIGHT_SIDED_PLANS
-bool _use_right_sided_plans_ = true;
-
-#else
-bool _use_right_sided_plans_ = false;
-
-#endif
-
static List *new_joininfo_list(List *joininfo_list, Relids join_relids);
static bool nonoverlap_sets(List *s1, List *s2);
static bool is_subset(List *s1, List *s2);
join_list = lappend(join_list, joined_rel);
/* Right-sided plan */
- if (_use_right_sided_plans_ &&
- length(old_rel->relids) > 1)
+ if (length(old_rel->relids) > 1)
{
joined_rel = make_join_rel(
get_base_rel(root, lfirsti(unjoined_relids)),
}
}
- if (BushyPlanFlag && only_relids == NIL) /* no bushy from geqo */
+ if (only_relids == NIL) /* no bushy from geqo */
{
List *r;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.102 1999/02/18 05:26:24 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.103 1999/02/18 06:00:49 momjian Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
fprintf(stderr,
"Usage: %s [options] [dbname]\n", progname);
#ifdef USE_ASSERT_CHECKING
- fprintf(stderr, " A: enable/disable assert checking\n");
+ fprintf(stderr, "\t-A enable/disable assert checking\n");
#endif
fprintf(stderr, "\t-B buffers\tset number of buffers in buffer pool\n");
fprintf(stderr, "\t-C \t\tsupress version info\n");
optind = 1; /* reset after postmaster usage */
while ((flag = getopt(argc, argv,
- "A:B:bCD:d:Eef:iK:Lm:MNo:P:pQS:st:v:x:FW:"))
+ "A:B:CD:d:Eef:iK:Lm:MNo:P:pQS:st:v:x:FW:"))
!= EOF)
switch (flag)
{
if (!IsUnderPostmaster)
{
puts("\nPOSTGRES backend interactive interface ");
- puts("$Revision: 1.102 $ $Date: 1999/02/18 05:26:24 $\n");
+ puts("$Revision: 1.103 $ $Date: 1999/02/18 06:00:49 $\n");
}
/* ----------------
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.92 1999/02/13 23:22:40 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.93 1999/02/18 06:01:00 momjian Exp $
*
*-------------------------------------------------------------------------
*/
{
"PGCOSTINDEX", "cost_index"
},
- {
- "PGRPLANS", "r_plans"
- },
{
"PGGEQO", "geqo"
},
.\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here....
-.\" $Header: /cvsroot/pgsql/src/man/Attic/set.l,v 1.14 1999/02/14 04:57:02 momjian Exp $
+.\" $Header: /cvsroot/pgsql/src/man/Attic/set.l,v 1.15 1999/02/18 06:01:11 momjian Exp $
.TH SET SQL 05/14/97 PostgreSQL PostgreSQL
.SH NAME
set - set run-time parameters for session
on=10 - use for statements with 10 or more tables
off - do not use the genetic optimizer
.fi
-.PP
-.IR R_PLANS
-enables or disables right-hand evaluation of plans. It may be useful
-when joining big relations with small ones. This algorithm is
-.IR off
-by default. It's not used by GEQO anyway.
-
-.if n .ta 5 +15 +40
-.if t .ta 0.5i +1.5i +3.0i
-.in 0
-.nf
-.ce 1
-\fBR_PLANS Values\fR
-
- on - turn right-hand plan evaluation 'on'
- off - do not use right-hand plan evaluation
-.fi
-
.PP
.IR QUERY_LIMIT
restricts the number of rows returned by a query.