SV: cpu-intensive immutable function and parallel scan

2021-06-22 Thread Niels Jespersen
>Fra: David Rowley Sendt: 22. juni 2021 09:10 >Emne: Re: cpu-intensive immutable function and parallel scan >On Tue, 22 Jun 2021 at 19:06, Niels Jespersen wrote: >> I think I could achieve some speedup by parallelizing further, distributing >> the cpu-work among additional

Re: cpu-intensive immutable function and parallel scan

2021-06-22 Thread Tom Lane
David Rowley writes: > On Tue, 22 Jun 2021 at 19:06, Niels Jespersen 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 hig

Re: cpu-intensive immutable function and parallel scan

2021-06-22 Thread David Rowley
On Tue, 22 Jun 2021 at 19:06, Niels Jespersen 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_pa

cpu-intensive immutable function and parallel scan

2021-06-22 Thread Niels Jespersen
Hello all I have a cpu-intensive plpython3u function that computes a result on the value from a single column value from a simple select.This looks largely like this. select function_name (t1.val1, 'constant1') from t1 where t1.p = '202012_1' and t1.val1 is not null; The function is marked imm