Configuration parameter

min_parallel_table_scan_size — PostgreSQL configuration parameter

Category Query Planning Default 8 megabytes (8MB

Sets the minimum amount of table data that must be scanned in order for a parallel scan to be considered.

At a glance

Property Value
Parameter min_parallel_table_scan_size
Category Query Planning
Default 8
Value type integer
Change scope Per-session (SET)
Available in PostgreSQL 12, 13, 14, 15, 16, 17, 18, 19 (added in 12)

What it does

Sets the minimum amount of table data that must be scanned in order for a parallel scan to be considered. For a parallel sequential scan, the amount of table data scanned is always equal to the size of the table, but when indexes are used the amount of table data scanned will normally be less. If this value is specified without units, it is taken as blocks, that is BLCKSZ bytes, typically 8kB. The default is 8 megabytes (8MB).

(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 min_parallel_table_scan_size; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'min_parallel_table_scan_size';.

Tuning guidance

Lower it so smaller tables qualify for parallel sequential scans; raise it to keep parallelism reserved for genuinely large scans. Pair with max_parallel_workers_per_gather.

Reference

PostgreSQL documentation — min_parallel_table_scan_size.

Keep going

Related & next steps

Was this helpful?

← All configuration parameters