]> granicus.if.org Git - postgresql/commit
Avoid projecting tuples unnecessarily in Gather and Gather Merge.
authorRobert Haas <rhaas@postgresql.org>
Sat, 25 Nov 2017 15:49:17 +0000 (10:49 -0500)
committerRobert Haas <rhaas@postgresql.org>
Sat, 25 Nov 2017 15:49:17 +0000 (10:49 -0500)
commitb10967eddf964f8c0a11060cf3f366bbdd1235f6
tree71c573073d45393095a2a2386999ae430b234b63
parent0f2458ff5f970cade04313f1a10fe01d02f888b7
Avoid projecting tuples unnecessarily in Gather and Gather Merge.

It's most often the case that the target list for the Gather (Merge)
node matches the target list supplied by the underlying plan node;
when this is so, we can avoid the overhead of projecting.

This depends on commit f455e1125e2588d4cd4fc663c6a10da4e003a3b5 for
proper functioning.

Idea by Andres Freund.  Patch by me.  Review by Amit Kapila.

Discussion: http://postgr.es/m/CA+TgmoZ0ZL=cesZFq8c9NnfK6bqy-wwUd3_74iYGodYrSoQ7Fw@mail.gmail.com
src/backend/executor/execScan.c
src/backend/executor/execUtils.c
src/backend/executor/nodeGather.c
src/backend/executor/nodeGatherMerge.c
src/include/executor/executor.h