Re: [HACKERS] why not parallel seq scan for slow functions

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Marina Polyakova <m(dot)polyakova(at)postgrespro(dot)ru>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Amit Khandekar <amitdkhan(dot)pg(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Subject: Re: [HACKERS] why not parallel seq scan for slow functions
Date: 2018-03-26 21:38:44
Message-ID: CA+TgmoYOLRaRxr5aXmFFCVS=67EOdRUtXw-Qqq3qS_=Le4Ojzw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Mar 24, 2018 at 9:40 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> For me, it is equivalent to the master. The average of ten runs on
> the master is 20664.3683 and with all the patches applied it is
> 20590.4734. I think there is some run-to-run variation, but more or
> less there is no visible degradation. I think we have found the root
> cause and eliminated it. OTOH, I have found another case where new
> patch series seems to degrade.

All right, I have scaled my ambitions back further. Here is a revised
and slimmed-down version of the patch series. If we forget about
"Remove explicit path construction logic in create_ordered_paths" for
now, then we don't really need a new upperrel. So this patch just
modifies the toplevel scan/join rel in place, which should avoid a
bunch of overhead in add_path() and other places, while hopefully
still fixing the originally-reported problem. I haven't tested this
beyond verifying that it passes the regression test, but I've run out
of time for today.

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

Attachment Content-Type Size
0004-Rewrite-the-code-that-applies-scan-join-targets-to-p.patch application/octet-stream 61.6 KB
0003-Postpone-generate_gather_paths-for-topmost-scan-join.patch application/octet-stream 6.1 KB
0002-CP_IGNORE_TLIST.patch application/octet-stream 6.5 KB
0001-Teach-create_projection_plan-to-omit-projection-wher.patch application/octet-stream 3.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2018-03-26 21:54:32 Re: Parallel Aggregates for string_agg and array_agg
Previous Message Damir Simunic 2018-03-26 21:36:15 Re: Proposal: http2 wire format