Skip site navigation (1) Skip section navigation (2)

pgsql: Support MergeAppend plans,to allow sorted output from append re

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Support MergeAppend plans,to allow sorted output from append re
Date: 2010-10-14 20:58:35
Message-ID: E1P6Usl-0007hM-Lu@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Support MergeAppend plans, to allow sorted output from append relations.

This patch eliminates the former need to sort the output of an Append scan
when an ordered scan of an inheritance tree is wanted.  This should be
particularly useful for fast-start cases such as queries with LIMIT.

Original patch by Greg Stark, with further hacking by Hans-Jurgen Schonig,
Robert Haas, and Tom Lane.

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=11cad29c91524aac1d0b61e0ea0357398ab79bf8

Modified Files
--------------
src/backend/commands/explain.c          |   57 ++++-
src/backend/executor/Makefile           |    2 +-
src/backend/executor/execAmi.c          |    5 +
src/backend/executor/execCurrent.c      |   23 ++
src/backend/executor/execProcnode.c     |   14 +
src/backend/executor/nodeMergeAppend.c  |  392 +++++++++++++++++++++++++++++++
src/backend/nodes/copyfuncs.c           |   28 +++
src/backend/nodes/outfuncs.c            |   42 ++++
src/backend/optimizer/README            |    5 +-
src/backend/optimizer/path/allpaths.c   |  169 ++++++++++++--
src/backend/optimizer/path/costsize.c   |   78 ++++++-
src/backend/optimizer/path/equivclass.c |   14 +-
src/backend/optimizer/plan/createplan.c |  205 +++++++++++++++--
src/backend/optimizer/plan/setrefs.c    |   18 ++
src/backend/optimizer/plan/subselect.c  |   16 ++
src/backend/optimizer/util/pathnode.c   |   71 ++++++
src/backend/utils/adt/ruleutils.c       |   14 +-
src/include/executor/nodeMergeAppend.h  |   24 ++
src/include/nodes/execnodes.h           |   27 ++
src/include/nodes/nodes.h               |    3 +
src/include/nodes/plannodes.h           |   16 ++
src/include/nodes/relation.h            |   25 ++-
src/include/optimizer/cost.h            |    4 +
src/include/optimizer/pathnode.h        |    4 +
src/test/regress/expected/inherit.out   |   95 ++++++++
src/test/regress/sql/inherit.sql        |   33 +++
26 files changed, 1316 insertions(+), 68 deletions(-)

pgsql-committers by date

Next:From: Simon RiggsDate: 2010-10-14 22:23:59
Subject: pgsql: Improvements to docs about pg_archive_cleanup and use ofarchive
Previous:From: Peter EisentrautDate: 2010-10-14 20:25:39
Subject: pgsql: Fix makefile logic to not break the build when xgettext ismissi

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group