aboutsummaryrefslogtreecommitdiff
path: root/src/backend/optimizer/util/pathnode.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-11-24 21:52:15 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-11-24 21:52:15 +0000
commit04c8785c7b2b3dea038522cd96085c710c628c5b (patch)
tree728c137a49ae2c3e02a8c00b549543ab23680b75 /src/backend/optimizer/util/pathnode.c
parent6bfc09baf4043a6b9db9a4bae245973e7557998e (diff)
downloadpostgresql-04c8785c7b2b3dea038522cd96085c710c628c5b.tar.gz
postgresql-04c8785c7b2b3dea038522cd96085c710c628c5b.zip
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.
Diffstat (limited to 'src/backend/optimizer/util/pathnode.c')
-rw-r--r--src/backend/optimizer/util/pathnode.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c
index 7dd0dce6891..e99435a6edf 100644
--- a/src/backend/optimizer/util/pathnode.c
+++ b/src/backend/optimizer/util/pathnode.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.79 2002/11/06 00:00:44 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.80 2002/11/24 21:52:14 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -354,12 +354,9 @@ create_index_path(Query *root,
pathnode->indexscandir = indexscandir;
/*
- * This routine is only used to generate "standalone" indexpaths, not
- * nestloop inner indexpaths. So joinrelids is always NIL and the
- * number of rows is the same as the parent rel's estimate.
+ * The number of rows is the same as the parent rel's estimate, since
+ * this isn't a join inner indexscan.
*/
- pathnode->joinrelids = NIL; /* no join clauses here */
- pathnode->alljoinquals = false;
pathnode->rows = rel->rows;
/*