]> granicus.if.org Git - postgresql/commit
Restructure planning of nestloop inner indexscans so that the set of usable
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 24 Nov 2002 21:52:15 +0000 (21:52 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 24 Nov 2002 21:52:15 +0000 (21:52 +0000)
commit04c8785c7b2b3dea038522cd96085c710c628c5b
tree728c137a49ae2c3e02a8c00b549543ab23680b75
parent6bfc09baf4043a6b9db9a4bae245973e7557998e
Restructure planning of nestloop inner indexscans so that the set of usable
joinclauses is determined accurately for each join.  Formerly, the code only
considered joinclauses that used all of the rels from the outer side of the
join; thus for example
FROM (a CROSS JOIN b) JOIN c ON (c.f1 = a.x AND c.f2 = b.y)
could not exploit a two-column index on c(f1,f2), since neither of the
qual clauses would be in the joininfo list it looked in.  The new code does
this correctly, and also is able to eliminate redundant clauses, thus fixing
the problem noted 24-Oct-02 by Hans-Jürgen Schönig.
19 files changed:
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/list.c
src/backend/nodes/outfuncs.c
src/backend/nodes/readfuncs.c
src/backend/optimizer/path/indxpath.c
src/backend/optimizer/path/joinpath.c
src/backend/optimizer/path/orindxpath.c
src/backend/optimizer/path/tidpath.c
src/backend/optimizer/plan/initsplan.c
src/backend/optimizer/util/pathnode.c
src/backend/optimizer/util/plancat.c
src/backend/optimizer/util/relnode.c
src/backend/optimizer/util/restrictinfo.c
src/include/nodes/nodes.h
src/include/nodes/pg_list.h
src/include/nodes/relation.h
src/include/optimizer/paths.h
src/include/optimizer/restrictinfo.h