并行扫描
最近更新时间: 2025-02-18 16:02:00
postgres=# set max_parallel_workers_per_gather to 2;
postgres=# explain select count(1) from t1;
QUERY PLAN
--------------------------------------------------------------------------------------------------
Parallel Finalize Aggregate (cost=9387.28..9387.29 rows=1 width=8)
-> Parallel Remote Subquery Scan on all (dn001,dn002) (cost=9387.17..9387.28 rows=1 width=0)
-> Gather (cost=9287.17..9287.28 rows=1 width=8)
Workers Planned: 2
-> Partial Aggregate (cost=8287.17..8287.18 rows=1 width=8)
-> Parallel Seq Scan on t1 (cost=0.00..7766.33 rows=208333 width=0)
(6 rows)