Thread: pgsql: Avoid projecting tuples unnecessarily in Gather and GatherMerge
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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/b10967eddf964f8c0a11060cf3f366bbdd1235f6 Modified Files -------------- src/backend/executor/execScan.c | 75 ++----------------------------- src/backend/executor/execUtils.c | 80 ++++++++++++++++++++++++++++++++++ src/backend/executor/nodeGather.c | 16 ++++--- src/backend/executor/nodeGatherMerge.c | 24 +++++----- src/include/executor/executor.h | 2 + 5 files changed, 110 insertions(+), 87 deletions(-)