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/path/orindxpath.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/backend/optimizer/path/orindxpath.c') diff --git a/src/backend/optimizer/path/orindxpath.c b/src/backend/optimizer/path/orindxpath.c index f0c1a44196d..009afdff079 100644 --- a/src/backend/optimizer/path/orindxpath.c +++ b/src/backend/optimizer/path/orindxpath.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.47 2002/06/20 20:29:30 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.48 2002/11/24 21:52:14 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -92,9 +92,6 @@ create_or_index_paths(Query *root, RelOptInfo *rel) /* We don't actually care what order the index scans in. */ pathnode->indexscandir = NoMovementScanDirection; - /* This isn't a nestloop innerjoin, so: */ - pathnode->joinrelids = NIL; /* no join clauses here */ - pathnode->alljoinquals = false; pathnode->rows = rel->rows; best_or_subclause_indices(root, -- cgit v1.2.3