Re: Oddity in EXPLAIN for foreign/custom join pushdown plans

From: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
To: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Oddity in EXPLAIN for foreign/custom join pushdown plans
Date: 2016-07-27 08:50:32
Message-ID: 6b2c397d-f75e-a976-efd4-54ac53f3e848@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2016/07/27 13:09, Ashutosh Bapat wrote:
> The patch always prints ForeignJoin when scanrelid <= 0, which would be
> odd considering that FDWs can now push down post-join operations. We
> need to device a better way to convey post-join operations. May be
> something like
> Foreign Grouping, aggregation on ...
> Foreign Join on ...

Good point!

The point of the proposed patch is to print "Foreign Join"/"Custom
Join", to show, in every text/xml/json/yaml format, that there are
multiple target relations involved in that join and to print those
relations, following the "Foreign Join"/"Custom Join" words, which I
think would be more machine-readable.

> But then the question is a foreign scan node can be pushing down many
> operations together e.g. join, aggregation, sort OR join aggregation and
> windowing OR join and insert. How would we clearly convey this? May be
> we say
> Foreign Scan
> operations: join on ..., aggregation, ...
>
> That wouldn't be so great and might be clumsy for many operations. Any
> better idea?

How about: when doing post scan/join operations remotely, print such
additional operations in EXPLAIN the same way as in the "Relations" or
"Remote SQL" info printed by postgres_fdw. Maybe something like this:

Foreign Scan/Join on target relation(s)
Output: ...
Relations: ...
Additional Operations: grouping, aggregate, ...
Remote SQL: ...

That seems not that clumsy to me.

Best regards,
Etsuro Fujita

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2016-07-27 08:55:42 Re: Oddity in EXPLAIN for foreign/custom join pushdown plans
Previous Message Andrew Borodin 2016-07-27 06:33:03 Re: Optimizing numeric SUM() aggregate