Configuration parameter

geqo_seed — PostgreSQL configuration parameter

Category Query Planning

Controls the initial value of the random number generator used by GEQO to select random paths through the join order search space.

At a glance

Property Value
Parameter geqo_seed
Category Query Planning
Default (see documentation)
Value type floating point
Change scope Per-session (SET)
Available in PostgreSQL 12, 13, 14, 15, 16, 17, 18, 19 (added in 12)

What it does

Controls the initial value of the random number generator used by GEQO to select random paths through the join order search space. The value can range from zero (the default) to one. Varying the value changes the set of join paths explored, and may result in a better or worse best path being found.

(Description quoted from the official PostgreSQL documentation.)

How to apply a change

Can be set per session with SET, per role/database with ALTER ROLE/DATABASE ... SET, or globally in postgresql.conf.

Inspect the current value and source with SHOW geqo_seed; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'geqo_seed';.

Tuning guidance

This parameter is rarely a performance lever. Leave it at the default unless you have a specific, documented reason to change it, change it on one session or one role/database first, and confirm the effect with pg_settings and your own measurements before rolling it out cluster-wide.

Reference

PostgreSQL documentation — geqo_seed.

Keep going

Related & next steps

Concepts on this page

Was this helpful?

← All configuration parameters