Re: Parallel Seq Scan vs kernel read ahead
David Rowley <dgrowleyml@gmail.com>
From: David Rowley <dgrowleyml@gmail.com>
To: "k.jamison@fujitsu.com" <k.jamison@fujitsu.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>,
Thomas Munro <thomas.munro@gmail.com>, Robert Haas <robertmhaas@gmail.com>, Ranier Vilela <ranier.vf@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2020-07-22T08:18:07Z
Lists: pgsql-hackers
On Wed, 22 Jul 2020 at 18:17, k.jamison@fujitsu.com <k.jamison@fujitsu.com> wrote: > Even though I read the documentation [1][2] on parallel query, I might not have > understood it clearly yet. So thank you very much for explaining simpler how the > relation size, GUCs, and reloption affect the query planner's behavior > So in this test case, I shouldn't force the workers to have same values for workers > planned and workers launched, is it correct? To just let the optimizer do its own decision. What you want to do is force the planner's hand with each test as to how many parallel workers it uses by setting the reloption parallel_workers to the number of workers you want to test. Just make sure the executor has enough workers to launch by setting max_parallel_workers and max_worker_processes to something high enough to conduct the tests without the executor failing to launch any workers. > Maybe the relation size is also small as you mentioned, that the query optimizer decided > to only use 6 workers in my previous test. So let me see first if the results would vary > again with the above configuration and testing different values for parallel_workers. The parallel_worker reloption will overwrite the planner's choice of how many parallel workers to use. Just make sure the executor has enough to use. You'll be able to determine that from the Workers Planned matching Workers Launched. David
Commits
-
Allocate consecutive blocks during parallel seqscans
- 56788d2156fc 14.0 landed