Back to Yugabyte Db

Parallel queries

docs/content/v2.25/additional-features/parallel-query.md

2026.1.0.0-b252.2 KB
Original Source

YugabyteDB supports the use of PostgreSQL parallel queries. Using parallel queries, the query planner can devise plans that leverage multiple CPUs to answer queries faster.

Currently, YugabyteDB supports parallel queries for colocated tables; support for hash- and range-sharded tables is planned.

To enable and configure parallel queries, set the following configuration parameters.

ParameterDescriptionDefault
yb_enable_parallel_appendEnables the planner's use of parallel append plans. To enable parallel query, set this to true.false
yb_parallel_range_rowsThe number of rows to plan per parallel worker. To enable parallel query, set this to a value other than 0. (Recommended: 10000)0
yb_parallel_range_sizeApproximate size of parallel range for DocDB relation scans.1MB

In addition, you can use the following PostgreSQL configuration parameters to configure parallel queries:

For more information, refer to How Parallel Query Works in the PostgreSQL documentation.