]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Restructure planner's handling of inheritance. Rather than processing
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 31 Jan 2006 21:39:25 +0000 (21:39 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 31 Jan 2006 21:39:25 +0000 (21:39 +0000)
commit8a1468af4e5c50dde8ce938886f4672459009b9b
treeeb9ae5decb8be1ebca8d124d947d0b7282802953
parent097df388b72584501762ac4c400dccff8a3671eb
Restructure planner's handling of inheritance.  Rather than processing
inheritance trees on-the-fly, which pretty well constrained us to considering
only one way of planning inheritance, expand inheritance sets during the
planner prep phase, and build a side data structure that can be consulted
later to find which RTEs are members of which inheritance sets.  As proof of
concept, use the data structure to plan joins against inheritance sets more
efficiently: we can now use indexes on the set members in inner-indexscan
joins.  (The generated plans could be improved further, but it'll take some
executor changes.)  This data structure will also support handling UNION ALL
subqueries in the same way as inheritance sets, but that aspect of it isn't
finished yet.
18 files changed:
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/outfuncs.c
src/backend/optimizer/path/allpaths.c
src/backend/optimizer/path/joinpath.c
src/backend/optimizer/plan/initsplan.c
src/backend/optimizer/plan/planmain.c
src/backend/optimizer/plan/planner.c
src/backend/optimizer/prep/prepjointree.c
src/backend/optimizer/prep/prepunion.c
src/backend/optimizer/util/clauses.c
src/backend/optimizer/util/plancat.c
src/backend/optimizer/util/relnode.c
src/backend/rewrite/rewriteManip.c
src/include/nodes/nodes.h
src/include/nodes/relation.h
src/include/optimizer/pathnode.h
src/include/optimizer/prep.h