Re: cpu-intensive immutable function and parallel scan

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Niels Jespersen <NJN(at)dst(dot)dk>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: cpu-intensive immutable function and parallel scan
Date: 2021-06-22 07:09:50
Message-ID: CAApHDvrBHyx=1kng+QbcN7B=nbn8ZbxN0gvK35gXaea7sSFpiA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 22 Jun 2021 at 19:06, Niels Jespersen <NJN(at)dst(dot)dk> wrote:
> I think I could achieve some speedup by parallelizing further, distributing the cpu-work among additional workers. But, how do I achive that best?

You'll want to ensure max_parallel_workers_per_gather is set high
enough and you have max_parallel_workers set to something high enough.
You can then do:

alter table t1 set (parallel_workers = <number of workers>);

David

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mike Yeap 2021-06-22 08:02:01 Postgres PANIC when it could not open file in pg_logical/snapshots directory
Previous Message Niels Jespersen 2021-06-22 07:06:10 cpu-intensive immutable function and parallel scan