postgresql_16:3.12.3 Parallel Plans
PostgreSQL 16 > The SQL Language > Parallel Query > Parallel Plans
Because each worker executes the parallel portion of the plan to completion, it is not possible to simply take an ordinary query plan and run it using multiple workers. Each worker would produce a full copy of the output result set, so the query would not run any faster than normal but would produce incorrect results. Instead, the parallel portion of the plan must be what is known internally to the query optimizer as a *partial plan*; that is, it must be constructed so that each process that executes the plan will generate only a subset of the output rows in such a way that each required output row is guaranteed to be generated by exactly one of the cooperating processes. Generally, this means that the scan on the driving table of the query must be a parallel-aware scan.
Subsections
- postgresql_16:3.12.3.1 Parallel Scans
- postgresql_16:3.12.3.2 Parallel Joins
- postgresql_16:3.12.3.3 Parallel Aggregation
- postgresql_16:3.12.3.4 Parallel Append
- postgresql_16:3.12.3.5 Parallel Plan Tips