Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ade9158

Browse files
committed
Remove the old advice to keep from_collapse_limit less than geqo_threshold,
instead just pointing out that a larger value may trigger use of GEQO. Per Robert Haas. In passing, do a bit of wordsmithing on the Genetic Query Optimizer section.
1 parent 7c8d7a2 commit ade9158

File tree

1 file changed

+35
-15
lines changed

1 file changed

+35
-15
lines changed

doc/src/sgml/config.sgml

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.216 2009/04/27 16:27:35 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.217 2009/06/02 17:37:55 tgl Exp $ -->
22

33
<chapter Id="runtime-config">
44
<title>Server Configuration</title>
@@ -2025,6 +2025,16 @@ archive_command = 'copy "%p" "C:\\server\\archivedir\\%f"' # Windows
20252025
<sect2 id="runtime-config-query-geqo">
20262026
<title>Genetic Query Optimizer</title>
20272027

2028+
<para>
2029+
The genetic query optimizer (GEQO) is an algorithm that does query
2030+
planning using heuristic searching. This reduces planning time for
2031+
complex queries (those joining many relations), at the cost of producing
2032+
plans that are sometimes inferior to those found by the normal
2033+
exhaustive-search algorithm. Also, GEQO's searching is randomized and
2034+
therefore its plans may vary nondeterministically.
2035+
For more information see <xref linkend="geqo">.
2036+
</para>
2037+
20282038
<variablelist>
20292039

20302040
<varlistentry id="guc-geqo" xreflabel="geqo">
@@ -2041,11 +2051,10 @@ archive_command = 'copy "%p" "C:\\server\\archivedir\\%f"' # Windows
20412051
<term><varname>geqo</varname> (<type>boolean</type>)</term>
20422052
<listitem>
20432053
<para>
2044-
Enables or disables genetic query optimization, which is an
2045-
algorithm that attempts to do query planning without
2046-
exhaustive searching. This is on by default. The
2047-
<varname>geqo_threshold</varname> variable provides a more
2048-
granular way to disable GEQO for certain classes of queries.
2054+
Enables or disables genetic query optimization.
2055+
This is on by default. It is usually best not to turn it off in
2056+
production; the <varname>geqo_threshold</varname> variable provides a
2057+
more granular way to control use of GEQO.
20492058
</para>
20502059
</listitem>
20512060
</varlistentry>
@@ -2075,8 +2084,8 @@ archive_command = 'copy "%p" "C:\\server\\archivedir\\%f"' # Windows
20752084
</indexterm>
20762085
<listitem>
20772086
<para>
2078-
Controls the trade off between planning time and query plan
2079-
efficiency in GEQO. This variable must be an integer in the
2087+
Controls the trade-off between planning time and query plan
2088+
quality in GEQO. This variable must be an integer in the
20802089
range from 1 to 10. The default value is five. Larger values
20812090
increase the time spent doing query planning, but also
20822091
increase the likelihood that an efficient query plan will be
@@ -2100,11 +2109,11 @@ archive_command = 'copy "%p" "C:\\server\\archivedir\\%f"' # Windows
21002109
</indexterm>
21012110
<listitem>
21022111
<para>
2103-
Controls the pool size used by GEQO. The pool size is the
2112+
Controls the pool size used by GEQO, that is the
21042113
number of individuals in the genetic population. It must be
21052114
at least two, and useful values are typically 100 to 1000. If
21062115
it is set to zero (the default setting) then a suitable
2107-
default is chosen based on <varname>geqo_effort</varname> and
2116+
value is chosen based on <varname>geqo_effort</varname> and
21082117
the number of tables in the query.
21092118
</para>
21102119
</listitem>
@@ -2117,11 +2126,11 @@ archive_command = 'copy "%p" "C:\\server\\archivedir\\%f"' # Windows
21172126
</indexterm>
21182127
<listitem>
21192128
<para>
2120-
Controls the number of generations used by GEQO. Generations
2121-
specifies the number of iterations of the algorithm. It must
2129+
Controls the number of generations used by GEQO, that is
2130+
the number of iterations of the algorithm. It must
21222131
be at least one, and useful values are in the same range as
21232132
the pool size. If it is set to zero (the default setting)
2124-
then a suitable default is chosen based on
2133+
then a suitable value is chosen based on
21252134
<varname>geqo_pool_size</varname>.
21262135
</para>
21272136
</listitem>
@@ -2252,10 +2261,15 @@ SELECT * FROM parent WHERE key = 2400;
22522261
The planner will merge sub-queries into upper queries if the
22532262
resulting <literal>FROM</literal> list would have no more than
22542263
this many items. Smaller values reduce planning time but might
2255-
yield inferior query plans. The default is eight. It is usually
2256-
wise to keep this less than <xref linkend="guc-geqo-threshold">.
2264+
yield inferior query plans. The default is eight.
22572265
For more information see <xref linkend="explicit-joins">.
22582266
</para>
2267+
2268+
<para>
2269+
Setting this value to <xref linkend="guc-geqo-threshold"> or more
2270+
may trigger use of the GEQO planner, resulting in nondeterministic
2271+
plans. See <xref linkend="runtime-config-query-geqo">.
2272+
</para>
22592273
</listitem>
22602274
</varlistentry>
22612275

@@ -2285,6 +2299,12 @@ SELECT * FROM parent WHERE key = 2400;
22852299
order they desire explicitly.
22862300
For more information see <xref linkend="explicit-joins">.
22872301
</para>
2302+
2303+
<para>
2304+
Setting this value to <xref linkend="guc-geqo-threshold"> or more
2305+
may trigger use of the GEQO planner, resulting in nondeterministic
2306+
plans. See <xref linkend="runtime-config-query-geqo">.
2307+
</para>
22882308
</listitem>
22892309
</varlistentry>
22902310

0 commit comments

Comments
 (0)