From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Speed up planner's scanning for parallel-query hazards.
Date: Fri, 19 Aug 2016 18:03:32 +0000
Message-ID: <E1bao8i-0000WP-0j@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Speed up planner's scanning for parallel-query hazards.
We need to scan the whole parse tree for parallel-unsafe functions.
If there are none, we'll later need to determine whether particular
subtrees contain any parallel-restricted functions. The previous coding
retained no knowledge from the first scan, even though this is very
wasteful in the common case where the query contains only parallel-safe
functions. We can bypass all of the later scans by remembering that fact.
This provides a small but measurable speed improvement when the case
applies, and shouldn't cost anything when it doesn't.
Patch by me, reviewed by Robert Haas
Discussion: <3740.1471538387@sss.pgh.pa.us>
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/da1c91631e3577ea5818f855ebb5bd206d559006
Modified Files
--------------
src/backend/nodes/outfuncs.c | 1 +
src/backend/optimizer/path/allpaths.c | 30 ++-------
src/backend/optimizer/plan/planmain.c | 9 ++-
src/backend/optimizer/plan/planner.c | 43 ++++++++-----
src/backend/optimizer/util/clauses.c | 115 +++++++++++++++++++++++++---------
src/backend/optimizer/util/pathnode.c | 6 +-
src/backend/optimizer/util/relnode.c | 4 +-
src/include/nodes/relation.h | 2 +
src/include/optimizer/clauses.h | 3 +-
9 files changed, 133 insertions(+), 80 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Speed up planner's scanning for parallel-query hazards.
In-Reply-To: <E1bao8i-0000WP-0j@gemulon.postgresql.org>
References: <E1bao8i-0000WP-0j@gemulon.postgresql.org>
* 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