pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrey V. Lepikhov <a.lepikhov@postgrespro.ru>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: etsuro.fujita@gmail.com
Cc: movead.li@highgo.ca
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Asynchronous Append on postgres_fdw nodes.
Date: Thu, 11 Jun 2020 12:03:45 +0500
Message-ID: <91ccc069-1f87-233e-1680-94dac770abf2@postgrespro.ru> (raw)
In-Reply-To: <20200610.120510.2075667454883130505.horikyota.ntt@gmail.com>
References: <c5b4ca1e-5550-a405-4199-191143f4e8c2@postgrespro.ru>
	<20200604.150015.2305436578805492574.horikyota.ntt@gmail.com>
	<90cced83-9061-0cac-0012-84e5faac8c78@postgrespro.ru>
	<20200610.120510.2075667454883130505.horikyota.ntt@gmail.com>

On 6/10/20 8:05 AM, Kyotaro Horiguchi wrote:
> Hello, Andrey.
> 
> At Tue, 9 Jun 2020 14:20:42 +0500, Andrey Lepikhov <a.lepikhov@postgrespro.ru> wrote in
>> On 6/4/20 11:00 AM, Kyotaro Horiguchi wrote:
>> 2. Total cost of an Append node is a sum of the subplans. Maybe in the
>> case of asynchronous append we need to use some reduce factor?
> 
> Yes.  For the reason mentioned above, foreign subpaths don't affect
> the startup cost of Append as far as any sync subpaths exist.  If no
> sync subpaths exist, the Append's startup cost is the minimum startup
> cost among the async subpaths.
I mean that you can possibly change computation of total cost of the 
Async append node. It may affect the planner choice between ForeignScan 
(followed by the execution of the JOIN locally) and partitionwise join 
strategies.

Have you also considered the possibility of dynamic choice between 
synchronous and async append (during optimization)? This may be useful 
for a query with the LIMIT clause.

-- 
Andrey Lepikhov
Postgres Professional





view thread (130+ messages)  latest in thread

Message-ID: <91ccc069-1f87-233e-1680-94dac770abf2@postgrespro.ru>
Permalink:  ../91ccc069-1f87-233e-1680-94dac770abf2@postgrespro.ru/
Also on:    postgresql.org/message-id/91ccc069-1f87-233e-1680-94dac770abf2@postgrespro.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: a.lepikhov@postgrespro.ru, horikyota.ntt@gmail.com, etsuro.fujita@gmail.com, movead.li@highgo.ca, pgsql-hackers@lists.postgresql.org
  Subject: Re: Asynchronous Append on postgres_fdw nodes.
  In-Reply-To: <91ccc069-1f87-233e-1680-94dac770abf2@postgrespro.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox