Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
b4e7510e
Commit
b4e7510e
authored
Feb 18, 1999
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable bushy and right-hand queries by default.
parent
65ccd103
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
153 deletions
+12
-153
doc/src/sgml/ref/set.sgml
doc/src/sgml/ref/set.sgml
+2
-59
src/backend/commands/variable.c
src/backend/commands/variable.c
+1
-55
src/backend/optimizer/path/joinrels.c
src/backend/optimizer/path/joinrels.c
+3
-12
src/backend/tcop/postgres.c
src/backend/tcop/postgres.c
+4
-4
src/interfaces/libpq/fe-connect.c
src/interfaces/libpq/fe-connect.c
+1
-4
src/man/set.l
src/man/set.l
+1
-19
No files found.
doc/src/sgml/ref/set.sgml
View file @
b4e7510e
...
...
@@ -413,64 +413,12 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
<para>
The frontend may be initialized by setting PGGEQO
environment variable.
<variablelist>
<varlistentry>
<term>
R_PLANS
</term>
<listitem>
<para>
Determines whether right-hand plan evaluation is allowed:
</para>
<variablelist>
<varlistentry>
<term>
On
</term>
<listitem>
<para>
enables right-hand evaluation of plans.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
Off
</term>
<listitem>
<para>
disables right-hand evaluation of plans.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
DEFAULT
</term>
<listitem>
<para>
Equivalent to specifying <command>SET R_PLANS='off'</command>.
</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
</variablelist>
</para>
<para>
It may be useful when joining big relations with
small ones. This algorithm is off by default.
It's not used by GEQO anyway.
</para>
<para>
The frontend may be initialized by setting the PGRPLANS
environment variable.
<variablelist>
<varlistentry>
<term>
...
...
@@ -527,7 +475,7 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
It's not used by GEQO anyway.
</para>
<para>
The frontend may be initialized by setting the PG
RPLANS
The frontend may be initialized by setting the PG
KSQO
environment variable.
<variablelist>
<varlistentry>
...
...
@@ -686,11 +634,6 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
--
SET GEQO = DEFAULT;
</programlisting>
<programlisting>
--Turn on right-hand evaluation of plans:
--
SET R_PLANS TO 'on';
</programlisting>
<programlisting>
--set the timezone for Berkeley, California:
SET TIME ZONE 'PST8PDT';
...
...
src/backend/commands/variable.c
View file @
b4e7510e
...
...
@@ -2,7 +2,7 @@
* Routines for handling of 'SET var TO',
* 'SHOW var' and 'RESET var' statements.
*
* $Id: variable.c,v 1.1
8 1998/12/18 09:10:20 vadim
Exp $
* $Id: variable.c,v 1.1
9 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
...
...
src/backend/optimizer/path/joinrels.c
View file @
b4e7510e
...
...
@@ -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
;
...
...
src/backend/tcop/postgres.c
View file @
b4e7510e
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.10
2 1999/02/18 05:26:24
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.10
3 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
\t
set number of buffers in buffer pool
\n
"
);
fprintf
(
stderr
,
"
\t
-C
\t\t
supress 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:
b
CD: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
(
"
\n
POSTGRES backend interactive interface "
);
puts
(
"$Revision: 1.10
2 $ $Date: 1999/02/18 05:26:24
$
\n
"
);
puts
(
"$Revision: 1.10
3 $ $Date: 1999/02/18 06:00:49
$
\n
"
);
}
/* ----------------
...
...
src/interfaces/libpq/fe-connect.c
View file @
b4e7510e
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.9
2 1999/02/13 23:22:4
0 momjian Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.9
3 1999/02/18 06:01:0
0 momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -136,9 +136,6 @@ static struct EnvironmentOptions
{
"PGCOSTINDEX"
,
"cost_index"
},
{
"PGRPLANS"
,
"r_plans"
},
{
"PGGEQO"
,
"geqo"
},
...
...
src/man/set.l
View file @
b4e7510e
.\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here....
.\" $Header: /cvsroot/pgsql/src/man/Attic/set.l,v 1.1
4 1999/02/14 04:57:02
momjian Exp $
.\" $Header: /cvsroot/pgsql/src/man/Attic/set.l,v 1.1
5 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
...
...
@@ -60,24 +60,6 @@ for more information.
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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment