Wiki / Configuration Parameters
geqo_threshold
Use genetic query optimization to plan queries with at least this many FROM items involved. (Note that a FULL OUTER JOIN construct counts as only one FROM item.) The default is 12. For simpler queries it is usually best to use the regular, exhaustive-search planner, but for queries with many tables the exhaustive search takes too long, often longer than the penalty of executing a suboptimal plan. Thus, a threshold on the size of the query is a convenient way to manage use of GEQO.
English manual coverage begins with PostgreSQL 7.4. Source history and runtime observations have their own recorded version boundaries.
Reading PG 18·Select a recorded version
- boot val
- 12
- category
- Query Tuning / Genetic Query Optimizer
- context
- user
- documented
- true
- enumvals
- Unknown
- extra desc
- Unknown
- lang
- en
- max val
- 2147483647
- metadata version
- 18
- min val
- 2
- name
- geqo_threshold
- short desc
- Sets the threshold of FROM items beyond which GEQO is used.
- source
- pg-settings-source-snapshot
- unit
- Unknown
- vartype
- integer
Definition PG 18
Use genetic query optimization to plan queries with at least this many FROM items involved. (Note that a FULL OUTER JOIN construct counts as only one FROM item.) The default is 12. For simpler queries it is usually best to use the regular, exhaustive-search planner, but for queries with many tables the exhaustive search takes too long, often longer than the penalty of executing a suboptimal plan. Thus, a threshold on the size of the query is a convenient way to manage use of GEQO.
Compare versions
Source references
Full definition and evidence JSON
Definition sources
center · PostgreSQL 18 · wiki-repair-20261023:95723f645555a4df07648f7bcc99c06d2a33a84aa83a81ef403036344191acd3
Text language: en · wiki-repair-20261023:95723f645555a4df07648f7bcc99c06d2a33a84aa83a81ef403036344191acd3