1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-13 16:22:44 +03:00

Enable bushy and right-hand queries by default.

This commit is contained in:
Bruce Momjian
1999-02-18 06:01:11 +00:00
parent 65ccd1039a
commit b4e7510e09
6 changed files with 12 additions and 153 deletions

View File

@@ -2,7 +2,7 @@
* 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 $
*
*/
@@ -36,9 +36,6 @@ static bool parse_cost_heap(const char *);
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 *);
@@ -58,7 +55,6 @@ extern Cost _cpu_page_wight_;
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;
/*
@@ -242,53 +238,6 @@ reset_geqo(void)
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
@@ -659,9 +608,6 @@ struct VariableParsers
{
"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

View File

@@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@@ -23,14 +23,6 @@
#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);
@@ -122,8 +114,7 @@ make_rels_by_clause_joins(Query *root, RelOptInfo *old_rel,
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)),
@@ -133,7 +124,7 @@ make_rels_by_clause_joins(Query *root, RelOptInfo *old_rel,
}
}
if (BushyPlanFlag && only_relids == NIL) /* no bushy from geqo */
if (only_relids == NIL) /* no bushy from geqo */
{
List *r;

View File

@@ -7,7 +7,7 @@
*
*
* 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
@@ -907,7 +907,7 @@ usage(char *progname)
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");
@@ -1017,7 +1017,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
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)
{
@@ -1522,7 +1522,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
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");
}
/* ----------------