From: | Kouhei Kaigai <kaigai(at)ak(dot)jp(dot)nec(dot)com> |
---|---|
To: | Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Oddity in EXPLAIN for foreign/custom join pushdown plans |
Date: | 2016-08-02 06:29:22 |
Message-ID: | 9A28C8860F777E439AA12E8AEA7694F801211EE5@BPXM15GP.gisp.nec.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> -----Original Message-----
> From: Etsuro Fujita [mailto:fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp]
> Sent: Tuesday, August 02, 2016 2:45 PM
> To: Kaigai Kouhei(海外 浩平); Ashutosh Bapat
> Cc: pgsql-hackers(at)postgresql(dot)org
> Subject: Re: [HACKERS] Oddity in EXPLAIN for foreign/custom join pushdown plans
>
> On 2016/08/02 13:32, Kouhei Kaigai wrote:
>
> I wrote:
> >> My concern here is EXPLAIN for foreign joins. I think it's another
> >> problem how we handle Foreign Scan plan nodes representing
> >> post-scan/join operations in EXPLAIN, so I'd like to leave that for
> >> another patch.
>
> > What is the post-scan/join operations? Are you saying EPQ recheck and
> > alternative local join plan?
>
> No. I mean e.g., aggregation, window functions, sorting, or table
> modification. In other words, Foreign Scan plan nodes created from
> ForeignPath paths created from GetForeignUpperPaths.
>
Why do you need to handle these upper paths individually?
FDW driver knows the remote query contains aggregation, window functions,
sorting, or table modification. It can give proper label.
If remote query contains partial aggregation and relations join, for
example, "Partial Agg + Scan" will be a proper label that shall be
followed by the "Foreign %s".
All you need to do are the two enhancements:
- Add "const char *explain_label" on the ForeignScanState or somewhere
extension can set. It gives a label to be printed.
If NULL string is set, EXPLAIN shows "Foreign Scan" as a default.
- Add "Bitmapset explain_rels" on the ForeignScanState or somewhere
extension can set. It indicates the relations to be printed after
the "Foreign %s" token. If you want to print all the relations names
underlying this ForeignScan node, just copy scanrelids bitmap.
If NULL bitmap is set, EXPLAIN shows nothing as a default.
Please note that the default does not change the existing behavior.
Thanks,
--
NEC Business Creation Division / PG-Strom Project
KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>
From | Date | Subject | |
---|---|---|---|
Next Message | Alfred Perlstein | 2016-08-02 07:11:05 | Re: Why we lost Uber as a user |
Previous Message | Michael Paquier | 2016-08-02 06:11:31 | Re: Increasing timeout of poll_query_until for TAP tests |