On Wed, Jan 17, 2018 at 10:22 PM, Peter Geoghegan <p...@bowt.ie> wrote: > As I said in a prior e-mail, even parallel query's use of > parallel_leader_participation is consistent with what I propose here, > practically speaking, because a partial path without leader > participation will always lose to a serial sequential scan path in > practice.
Amit's reply to this part drew my attention to it. I think this is entirely false. Consider an aggregate that doesn't support partial aggregation, and a plan that looks like this: Aggregate -> Gather -> Parallel Seq Scan Filter: something fairly selective It is quite possible for this to be superior to a non-parallel plan even with only 1 worker and no parallel leader participation. The worker can evaluate the filter qual, and the leader can evaluate the aggregate. If the CPU costs of doing those computations are high enough to outweigh the costs of shuffling tuples between backends, we win. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company