From 04c8785c7b2b3dea038522cd96085c710c628c5b Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 24 Nov 2002 21:52:15 +0000 Subject: =?UTF-8?q?Restructure=20planning=20of=20nestloop=20inner=20indexs?= =?UTF-8?q?cans=20so=20that=20the=20set=20of=20usable=20joinclauses=20is?= =?UTF-8?q?=20determined=20accurately=20for=20each=20join.=20=20Formerly,?= =?UTF-8?q?=20the=20code=20only=20considered=20joinclauses=20that=20used?= =?UTF-8?q?=20all=20of=20the=20rels=20from=20the=20outer=20side=20of=20the?= =?UTF-8?q?=20join;=20thus=20for=20example=20=09FROM=20(a=20CROSS=20JOIN?= =?UTF-8?q?=20b)=20JOIN=20c=20ON=20(c.f1=20=3D=20a.x=20AND=20c.f2=20=3D=20?= =?UTF-8?q?b.y)=20could=20not=20exploit=20a=20two-column=20index=20on=20c(?= =?UTF-8?q?f1,f2),=20since=20neither=20of=20the=20qual=20clauses=20would?= =?UTF-8?q?=20be=20in=20the=20joininfo=20list=20it=20looked=20in.=20=20The?= =?UTF-8?q?=20new=20code=20does=20this=20correctly,=20and=20also=20is=20ab?= =?UTF-8?q?le=20to=20eliminate=20redundant=20clauses,=20thus=20fixing=20th?= =?UTF-8?q?e=20problem=20noted=2024-Oct-02=20by=20Hans-J=C3=BCrgen=20Sch?= =?UTF-8?q?=C3=B6nig.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/optimizer/util/pathnode.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/backend/optimizer/util/pathnode.c') diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c index 7dd0dce689..e99435a6ed 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; /* -- cgit v1.2.1