pgsql: Push scan/join target list beneath Gather when possible.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Push scan/join target list beneath Gather when possible.
Date: 2016-03-18 13:52:24
Message-ID: E1agupE-0002dp-FP@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Push scan/join target list beneath Gather when possible.

This means that, for example, "SELECT expensive_func(a) FROM bigtab
WHERE something" can compute expensive_func(a) in the workers rather
than the leader if it happens to be parallel-safe, which figures to be
a big win in some practical cases.

Currently, we can only do this if the entire target list is
parallel-safe. If we worked harder, we might be able to evaluate
parallel-safe targets in the worker and any parallel-restricted
targets in the leader, but that would be more complicated, and there
aren't that many parallel-restricted functions that people are likely
to use in queries anyway. I think. So just do the simple thing for
the moment.

Robert Haas, Amit Kapila, and Tom Lane

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/992b5ba30dcafdc222341505b072a6b009b248a7

Modified Files
--------------
src/backend/optimizer/plan/createplan.c | 25 ++++++++++++++-----------
src/backend/optimizer/util/pathnode.c | 30 ++++++++++++++++++++++++++++++
2 files changed, 44 insertions(+), 11 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Teodor Sigaev 2016-03-18 15:25:42 pgsql: Introduce parse_ident()
Previous Message Robert Haas 2016-03-18 13:39:34 pgsql: Various minor corrections of and improvements to comments.