Parameters
Query Tuning
52 PostgreSQL 18.6 parameters. Each one has its own animation and explanation.
Genetic Query Optimizer
geqo: Use the genetic query optimizer for joins of many tables.geqo_effort: One knob (1–10) that scales GEQO pool size and generations.geqo_generations: Number of GEQO breeding rounds. 0 = same as the pool size.geqo_pool_size: Number of candidate join orders in the GEQO population. 0 = automatic.geqo_seed: Seed for GEQO's random choices; same seed + same query = same plan.geqo_selection_bias: How strongly GEQO prefers the best join orders as parents (1.5–2.0).geqo_threshold: Number of FROM items at which the genetic optimizer takes over.
Other Planner Options
constraint_exclusion: Use CHECK constraints to skip tables (inheritance, UNION ALL) that cannot match.cursor_tuple_fraction: Fraction of a cursor's rows the planner expects to be fetched.default_statistics_target: How detailed ANALYZE statistics are: sample size, histogram buckets, common values.from_collapse_limit: Max FROM-list size for merging a subquery into the outer query's join search.jit: Master switch for JIT compilation of query expressions with LLVM.join_collapse_limit: Max list size for reordering explicit JOINs; 1 keeps the written order.plan_cache_mode: Choose custom plans, generic plans, or let PostgreSQL decide for prepared statements.recursive_worktable_factor: Planner guess of a recursive CTE's working table size, as a multiple of its start.
Planner Cost Constants
cpu_index_tuple_cost: Planner price for processing one index entry during an index scan.cpu_operator_cost: Planner price for evaluating one operator or function call.cpu_tuple_cost: Planner price for processing one row.effective_cache_size: How much data the planner assumes is cached (shared buffers + OS cache).jit_above_cost: Query cost above which JIT compilation is used. -1 disables JIT.jit_inline_above_cost: Query cost above which JIT also inlines small functions and operators. -1 disables.jit_optimize_above_cost: Query cost above which JIT runs expensive LLVM optimizations. -1 disables.min_parallel_index_scan_size: Smallest amount of index data for a parallel index scan; also drives worker count.min_parallel_table_scan_size: Smallest table that is considered for a parallel scan; also drives worker count.parallel_setup_cost: Planner price for starting parallel worker processes.parallel_tuple_cost: Planner price for passing one row from a parallel worker to the leader.random_page_cost: Planner price for a non-sequential page read; lower it for SSDs.seq_page_cost: Planner price for reading one page as part of a sequential scan.
Planner Method Configuration
enable_async_append: Lets an Append run foreign-table scans concurrently instead of one after another.enable_bitmapscan: Allow bitmap index scans: collect matching row locations, then read pages in order.enable_distinct_reordering: Lets the planner reorder DISTINCT columns to match an index or sort order (new in 18).enable_gathermerge: Allow Gather Merge: combine already-sorted streams from parallel workers.enable_group_by_reordering: Lets GROUP BY columns be reordered to match an index or existing sort (since 17).enable_hashagg: Allow hash aggregation: group rows by putting them in an in-memory hash table.enable_hashjoin: Allow hash joins: build a hash table from one side, probe it with the other.enable_incremental_sort: Allow incremental sort: finish sorting input that is already sorted on leading keys.enable_indexonlyscan: Allow index-only scans: answer from the index alone when pages are all-visible.enable_indexscan: Allow plain index scans (and, with it, index-only scans).enable_material: Allow Materialize nodes that keep a copy of rows to re-read them cheaply.enable_memoize: Allow Memoize: cache inner-side results of a nested loop by parameter value.enable_mergejoin: Allow merge joins: walk two sorted inputs side by side.enable_nestloop: Allow nested-loop joins: for each outer row, look up matching inner rows.enable_parallel_append: Allow Parallel Append: spread partitions or UNION ALL branches across workers.enable_parallel_hash: Allow parallel hash joins where workers build one shared hash table.enable_partition_pruning: Skip partitions that cannot contain matching rows, at plan time and at run time.enable_partitionwise_aggregate: Allow grouping each partition separately, then combining the results.enable_partitionwise_join: Allow joining matching partitions pair by pair when both tables share a scheme.enable_presorted_aggregate: Let the planner feed ORDER BY / DISTINCT aggregates pre-sorted input (since 16).enable_self_join_elimination: Remove a join of a table to itself on a unique key (new in 18).enable_seqscan: Discourage sequential scans (reading the whole table) where any other path exists.enable_sort: Discourage explicit Sort steps where an already-ordered path exists.enable_tidscan: Allow TID scans: fetch rows directly by their physical location (ctid).