Re: Parallel Query

2019-11-14 Thread Luís Roberto Weck
Em 13/11/2019 19:08, Jeff Janes escreveu: On Wed, Nov 13, 2019 at 3:59 PM Luís Roberto Weck mailto:luisrobe...@siscobra.com.br>> wrote: Indeed, reducing the costs made the query run in parallel, but the improvement in speed was not worth the cost (CPU). Could you show the plan for t

Re: Parallel Query

2019-11-13 Thread Jeff Janes
On Wed, Nov 13, 2019 at 4:01 PM Luís Roberto Weck < luisrobe...@siscobra.com.br> wrote: > > Maybe PostgreSQL can't find a way to calculate having estimates? > I wasn't even thinking of the HAVING estimates I was thinking of just the raw aggregates. It can't implement the HAVING until has the raw

Re: Parallel Query

2019-11-13 Thread Jeff Janes
On Wed, Nov 13, 2019 at 3:59 PM Luís Roberto Weck < luisrobe...@siscobra.com.br> wrote: > > > Indeed, reducing the costs made the query run in parallel, but the > improvement in speed was not worth the cost (CPU). > Could you show the plan for that?

Re: Parallel Query

2019-11-13 Thread Luís Roberto Weck
Em 13/11/2019 17:40, Jeff Janes escreveu: On Wed, Nov 13, 2019 at 3:11 PM Luís Roberto Weck mailto:luisrobe...@siscobra.com.br>> wrote: Hi! Is there a reason query 3 can't use parallel workers? Using q1 and q2 they seem very similar but can use up to 4 workers to run faster:

Re: Parallel Query

2019-11-13 Thread Luís Roberto Weck
Em 13/11/2019 17:47, Tomas Vondra escreveu: On Wed, Nov 13, 2019 at 05:16:44PM -0300, Luís Roberto Weck wrote: Hi! Is there a reason query 3 can't use parallel workers? Using q1 and q2 they seem very similar but can use up to 4 workers to run faster: q1: https://pastebin.com/ufkbSmfB q

Re: Parallel Query

2019-11-13 Thread Tomas Vondra
On Wed, Nov 13, 2019 at 05:16:44PM -0300, Luís Roberto Weck wrote: Hi! Is there a reason query 3 can't use parallel workers? Using q1 and q2 they seem very similar but can use up to 4 workers to run faster: q1: https://pastebin.com/ufkbSmfB q2: https://pastebin.com/Yt32zRNX q3: https://pasteb

Re: Parallel Query

2019-11-13 Thread Jeff Janes
On Wed, Nov 13, 2019 at 3:11 PM Luís Roberto Weck < luisrobe...@siscobra.com.br> wrote: > Hi! > > Is there a reason query 3 can't use parallel workers? Using q1 and q2 > they seem very similar but can use up to 4 workers to run faster: > > q1: https://pastebin.com/ufkbSmfB > q2: https://pastebin.c

Re: parallel query

2019-04-02 Thread Laurenz Albe
Mariel Cherkassky wrote: > I wanted to a few questions regarding the parallel parameters : > max_worker_processes and max_parallel_workers_per_gather. > > 1)Basically, max_worker_processes should be set to the number of cpus I have > in the machine ? Setting it higher would not be smart. Setti