0

We are performing Citus benchmarking and came across a situation where the planner makes the parallel execution plan but during the execution no parallel workers are launched. The cluster has 3 worker nodes each with 2CPUs running on Centos. What can be the reason behind this?

->  Finalize Aggregate  (cost=76650.31..76650.32 rows=1 width=32) (actual time=174741.832..174741.999 rows=1 loops=1)
                 ->  Gather  (cost=76650.09..76650.30 rows=2 width=32) (actual time=174741.807..174741.974 rows=1 loops=1)
                       Workers Planned: 2
                       Workers Launched: 0
                       ->  Partial Aggregate  (cost=75650.09..75650.10 rows=1 width=32) (actual time=174740.490..174740.492 rows=1 loops=

Query we are using for benchmarking is

select sum(amount) from tab_dist_1 where id>=49820 and id<=59743292;
goodfella
  • 589
  • 4
  • 14

1 Answers1

2

There are two possible reasons:

  1. There are already max_parallel_workers running when your query starts executing, so no more parallel worker slots are available. There could also be other background processes running; the total limit for all background processes is max_worker_processes.

  2. You execute the query using the JDBC driver, and you (or some tool you are using) uses setMaxRows() to limit the number of result rows, which disables parallel query at execution time. See this article for details.

Laurenz Albe
  • 61,070
  • 4
  • 55
  • 90