-
+
Server Configuration
Genetic Query Optimizer
+ The genetic query optimizer (GEQO) is an algorithm that does query
+ planning using heuristic searching. This reduces planning time for
+ complex queries (those joining many relations), at the cost of producing
+ plans that are sometimes inferior to those found by the normal
+ exhaustive-search algorithm. Also, GEQO's searching is randomized and
+ therefore its plans may vary nondeterministically.
+ For more information see .
+
+
geqo (boolean)
- Enables or disables genetic query optimization, which is an
- algorithm that attempts to do query planning without
- exhaustive searching. This is on by default. The
- geqo_threshold variable provides a more
- granular way to disable GEQO for certain classes of queries.
+ Enables or disables genetic query optimization.
+ This is on by default. It is usually best not to turn it off in
+ production; the geqo_threshold variable provides a
+ more granular way to control use of GEQO.
- Controls the trade off between planning time and query plan
- efficiency in GEQO. This variable must be an integer in the
+ Controls the trade-off between planning time and query plan
+ quality in GEQO. This variable must be an integer in the
range from 1 to 10. The default value is five. Larger values
increase the time spent doing query planning, but also
increase the likelihood that an efficient query plan will be
- Controls the pool size used by GEQO. The pool size is the
+ Controls the pool size used by GEQO, that is the
number of individuals in the genetic population. It must be
at least two, and useful values are typically 100 to 1000. If
it is set to zero (the default setting) then a suitable
- default is chosen based on geqo_effort and
+ value is chosen based on geqo_effort and
the number of tables in the query.
- Controls the number of generations used by GEQO. Generations
- specifies the number of iterations of the algorithm. It must
+ Controls the number of generations used by GEQO, that is
+ the number of iterations of the algorithm. It must
be at least one, and useful values are in the same range as
the pool size. If it is set to zero (the default setting)
- then a suitable default is chosen based on
+ then a suitable value is chosen based on
geqo_pool_size.
The planner will merge sub-queries into upper queries if the
resulting FROM list would have no more than
this many items. Smaller values reduce planning time but might
- yield inferior query plans. The default is eight. It is usually
- wise to keep this less than .
+ yield inferior query plans. The default is eight.
For more information see .
+
+ Setting this value to or more
+ may trigger use of the GEQO planner, resulting in nondeterministic
+ plans. See .
+
order they desire explicitly.
For more information see .
+
+ Setting this value to or more
+ may trigger use of the GEQO planner, resulting in nondeterministic
+ plans. See .
+