Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb4e7510

Browse files
committed
Enable bushy and right-hand queries by default.
1 parent65ccd10 commitb4e7510

File tree

6 files changed

+12
-153
lines changed

6 files changed

+12
-153
lines changed

‎doc/src/sgml/ref/set.sgml

Lines changed: 2 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -413,64 +413,12 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
413413
<para>
414414
The frontend may be initialized by setting PGGEQO
415415
environment variable.
416-
417-
<variablelist>
418-
419-
<varlistentry>
420-
<term>
421-
R_PLANS
422-
</term>
423-
<listitem>
424-
<para>
425-
Determines whether right-hand plan evaluation is allowed:
426-
</para>
427-
428-
<variablelist>
429-
<varlistentry>
430-
<term>
431-
On
432-
</term>
433-
<listitem>
434-
<para>
435-
enables right-hand evaluation of plans.
436-
</para>
437-
</listitem>
438-
</varlistentry>
439-
440-
<varlistentry>
441-
<term>
442-
Off
443-
</term>
444-
<listitem>
445-
<para>
446-
disables right-hand evaluation of plans.
447-
</para>
448-
</listitem>
449-
</varlistentry>
450-
451-
<varlistentry>
452-
<term>
453-
DEFAULT
454-
</term>
455-
<listitem>
456-
<para>
457-
Equivalent to specifying <command>SET R_PLANS='off'</command>.
458-
</para>
459-
</listitem>
460-
</varlistentry>
461-
</variablelist>
462-
</listitem>
463-
</varlistentry>
464-
</variablelist>
465416
</para>
466417
<para>
467418
It may be useful when joining big relations with
468419
small ones. This algorithm is off by default.
469420
It's not used by GEQO anyway.
470-
</para>
471-
<para>
472-
The frontend may be initialized by setting the PGRPLANS
473-
environment variable.
421+
474422
<variablelist>
475423
<varlistentry>
476424
<term>
@@ -527,7 +475,7 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
527475
It's not used by GEQO anyway.
528476
</para>
529477
<para>
530-
The frontend may be initialized by setting thePGRPLANS
478+
The frontend may be initialized by setting thePGKSQO
531479
environment variable.
532480
<variablelist>
533481
<varlistentry>
@@ -686,11 +634,6 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
686634
--
687635
SET GEQO = DEFAULT;
688636
</programlisting>
689-
<programlisting>
690-
--Turn on right-hand evaluation of plans:
691-
--
692-
SET R_PLANS TO 'on';
693-
</programlisting>
694637
<programlisting>
695638
--set the timezone for Berkeley, California:
696639
SET TIME ZONE 'PST8PDT';

‎src/backend/commands/variable.c

Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Routines for handling of 'SET var TO',
33
*'SHOW var' and 'RESET var' statements.
44
*
5-
* $Id: variable.c,v 1.18 1998/12/1809:10:20 vadim Exp $
5+
* $Id: variable.c,v 1.19 1999/02/1806:00:44 momjian Exp $
66
*
77
*/
88

@@ -36,9 +36,6 @@ static bool parse_cost_heap(const char *);
3636
staticboolshow_cost_index(void);
3737
staticboolreset_cost_index(void);
3838
staticboolparse_cost_index(constchar*);
39-
staticboolshow_r_plans(void);
40-
staticboolreset_r_plans(void);
41-
staticboolparse_r_plans(constchar*);
4239
staticboolreset_geqo(void);
4340
staticboolshow_geqo(void);
4441
staticboolparse_geqo(constchar*);
@@ -58,7 +55,6 @@ extern Cost _cpu_page_wight_;
5855
externCost_cpu_index_page_wight_;
5956
externbool_use_geqo_;
6057
externint32_use_geqo_rels_;
61-
externbool_use_right_sided_plans_;
6258
externbool_use_keyset_query_optimizer;
6359

6460
/*
@@ -242,53 +238,6 @@ reset_geqo(void)
242238
return TRUE;
243239
}
244240

245-
/*
246-
*
247-
* R_PLANS
248-
*
249-
*/
250-
staticbool
251-
parse_r_plans(constchar*value)
252-
{
253-
if (value==NULL)
254-
{
255-
reset_r_plans();
256-
return TRUE;
257-
}
258-
259-
if (strcasecmp(value,"on")==0)
260-
_use_right_sided_plans_= true;
261-
elseif (strcasecmp(value,"off")==0)
262-
_use_right_sided_plans_= false;
263-
else
264-
elog(ERROR,"Bad value for Right-sided Plans (%s)",value);
265-
266-
return TRUE;
267-
}
268-
269-
staticbool
270-
show_r_plans()
271-
{
272-
273-
if (_use_right_sided_plans_)
274-
elog(NOTICE,"Right-sided Plans are ON");
275-
else
276-
elog(NOTICE,"Right-sided Plans are OFF");
277-
return TRUE;
278-
}
279-
280-
staticbool
281-
reset_r_plans()
282-
{
283-
284-
#ifdefUSE_RIGHT_SIDED_PLANS
285-
_use_right_sided_plans_= true;
286-
#else
287-
_use_right_sided_plans_= false;
288-
#endif
289-
return TRUE;
290-
}
291-
292241
/*
293242
*
294243
* COST_HEAP
@@ -659,9 +608,6 @@ struct VariableParsers
659608
{
660609
"geqo",parse_geqo,show_geqo,reset_geqo
661610
},
662-
{
663-
"r_plans",parse_r_plans,show_r_plans,reset_r_plans
664-
},
665611
#ifdefMULTIBYTE
666612
{
667613
"client_encoding",parse_client_encoding,show_client_encoding,reset_client_encoding

‎src/backend/optimizer/path/joinrels.c

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.29 1999/02/1805:26:19 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.30 1999/02/1806:00:46 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -23,14 +23,6 @@
2323
#include"optimizer/joininfo.h"
2424
#include"optimizer/pathnode.h"
2525

26-
#ifdefUSE_RIGHT_SIDED_PLANS
27-
bool_use_right_sided_plans_= true;
28-
29-
#else
30-
bool_use_right_sided_plans_= false;
31-
32-
#endif
33-
3426
staticList*new_joininfo_list(List*joininfo_list,Relidsjoin_relids);
3527
staticboolnonoverlap_sets(List*s1,List*s2);
3628
staticboolis_subset(List*s1,List*s2);
@@ -122,8 +114,7 @@ make_rels_by_clause_joins(Query *root, RelOptInfo *old_rel,
122114
join_list=lappend(join_list,joined_rel);
123115

124116
/* Right-sided plan */
125-
if (_use_right_sided_plans_&&
126-
length(old_rel->relids)>1)
117+
if (length(old_rel->relids)>1)
127118
{
128119
joined_rel=make_join_rel(
129120
get_base_rel(root,lfirsti(unjoined_relids)),
@@ -133,7 +124,7 @@ make_rels_by_clause_joins(Query *root, RelOptInfo *old_rel,
133124
}
134125
}
135126

136-
if (BushyPlanFlag&&only_relids==NIL)/* no bushy from geqo */
127+
if (only_relids==NIL)/* no bushy from geqo */
137128
{
138129
List*r;
139130

‎src/backend/tcop/postgres.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.102 1999/02/1805:26:24 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.103 1999/02/1806:00:49 momjian Exp $
1111
*
1212
* NOTES
1313
* this is the "main" module of the postgres backend and
@@ -907,7 +907,7 @@ usage(char *progname)
907907
fprintf(stderr,
908908
"Usage: %s [options] [dbname]\n",progname);
909909
#ifdefUSE_ASSERT_CHECKING
910-
fprintf(stderr," A: enable/disable assert checking\n");
910+
fprintf(stderr,"\t-A enable/disable assert checking\n");
911911
#endif
912912
fprintf(stderr,"\t-B buffers\tset number of buffers in buffer pool\n");
913913
fprintf(stderr,"\t-C \t\tsupress version info\n");
@@ -1017,7 +1017,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
10171017
optind=1;/* reset after postmaster usage */
10181018

10191019
while ((flag=getopt(argc,argv,
1020-
"A:B:bCD:d:Eef:iK:Lm:MNo:P:pQS:st:v:x:FW:"))
1020+
"A:B:CD:d:Eef:iK:Lm:MNo:P:pQS:st:v:x:FW:"))
10211021
!=EOF)
10221022
switch (flag)
10231023
{
@@ -1522,7 +1522,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
15221522
if (!IsUnderPostmaster)
15231523
{
15241524
puts("\nPOSTGRES backend interactive interface ");
1525-
puts("$Revision: 1.102 $ $Date: 1999/02/1805:26:24 $\n");
1525+
puts("$Revision: 1.103 $ $Date: 1999/02/1806:00:49 $\n");
15261526
}
15271527

15281528
/* ----------------

‎src/interfaces/libpq/fe-connect.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.92 1999/02/13 23:22:40 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.93 1999/02/18 06:01:00 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -136,9 +136,6 @@ static struct EnvironmentOptions
136136
{
137137
"PGCOSTINDEX","cost_index"
138138
},
139-
{
140-
"PGRPLANS","r_plans"
141-
},
142139
{
143140
"PGGEQO","geqo"
144141
},

‎src/man/set.l

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.\" This is -*-nroff-*-
22
.\" XXX standard disclaimer belongs here....
3-
.\" $Header: /cvsroot/pgsql/src/man/Attic/set.l,v 1.14 1999/02/14 04:57:02 momjian Exp $
3+
.\" $Header: /cvsroot/pgsql/src/man/Attic/set.l,v 1.15 1999/02/18 06:01:11 momjian Exp $
44
.TH SET SQL 05/14/97 PostgreSQL PostgreSQL
55
.SH NAME
66
set - set run-time parameters for session
@@ -60,24 +60,6 @@ for more information.
6060
on=10- use for statements with 10 or more tables
6161
off- do not use the genetic optimizer
6262
.fi
63-
.PP
64-
.IR R_PLANS
65-
enables or disables right-hand evaluation of plans. It may be useful
66-
when joining big relations with small ones. This algorithm is
67-
.IR off
68-
by default. It's not used by GEQO anyway.
69-
70-
.ifn .ta5+15+40
71-
.ift .ta0.5i+1.5i+3.0i
72-
.in0
73-
.nf
74-
.ce1
75-
\fBR_PLANSValues\fR
76-
77-
on- turn right-hand plan evaluation 'on'
78-
off- do not use right-hand plan evaluation
79-
.fi
80-
8163
.PP
8264
.IR QUERY_LIMIT
8365
restricts the number of rows returned by a query.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp