Re: [HACKERS] [POC] Faster processing at Gather node

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Ants Aasma <ants(dot)aasma(at)eesti(dot)ee>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Rafia Sabih <rafia(dot)sabih(at)enterprisedb(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] [POC] Faster processing at Gather node
Date: 2017-11-16 15:27:29
Message-ID: CA+TgmoZ+sXCL-1hC64VU4ML6HCVogaKpgyDFWjPoGmMpeY1QcQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 16, 2017 at 10:23 AM, Ants Aasma <ants(dot)aasma(at)eesti(dot)ee> wrote:
> For the Gather Merge driven by Parallel Index Scan case it seems to me
> that the correct queue size is one that can store two index pages
> worth of tuples. Additional space will always help buffer any
> performance variations, but there should be a step function somewhere
> around 1+1/n_workers pages. I wonder if the queue could be dynamically
> sized based on the driving scan. With some limits of course as parent
> nodes to the parallel index scan can increase the row count by
> arbitrary amounts.

Currently, Gather Merge can store 100 tuples + as much more stuff as
fits in a 64kB queue. That should already be more than 2 index pages,
I would think, although admittedly I haven't tested.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2017-11-16 15:34:06 Re: Schedule for migration to pglister
Previous Message Ants Aasma 2017-11-16 15:23:12 Re: [HACKERS] [POC] Faster processing at Gather node