Parallel Scans
The BM25 index supports parallel scans. You can check if the Postgres query planner chose a parallel scan by running EXPLAIN
on a query.
The following Postgres settings must be configured to increase the number of parallel workers.
Max Parallel Workers
max_parallel_workers
and max_worker_processes
control how many workers are available to parallel scans.
max_worker_processes
is a global limit for the number of available workers across all connections, and
max_parallel_workers
specifies how many of those workers can be used for parallel scans.
These settings must be changed inside postgresql.conf
, and Postgres needs to be restarted afterward.
Max Parallel Workers per Gather
max_parallel_workers_per_gather
is a limit for the number of parallel workers that a single parallel query can use. The default is 2
.
This setting can be set in postgresql.conf
to apply to all connections, or within a connection to apply to a single
session.
Was this page helpful?