diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-02-05 02:59:17 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-02-05 02:59:17 +0000 |
commit | 336a6491aaa8a2ba9a3118285522f237806b5e37 (patch) | |
tree | 8c7313483667dd002728fdc2243d088adf56f5a8 /src/backend/commands/explain.c | |
parent | 354213c7f493596448ca83f13d107a8ef7a08aae (diff) | |
download | postgresql-336a6491aaa8a2ba9a3118285522f237806b5e37.tar.gz postgresql-336a6491aaa8a2ba9a3118285522f237806b5e37.zip |
Improve my initial, rather hacky implementation of joins to append
relations: fix the executor so that we can have an Append plan on the
inside of a nestloop and still pass down outer index keys to index scans
within the Append, then generate such plans as if they were regular
inner indexscans. This avoids the need to evaluate the outer relation
multiple times.
Diffstat (limited to 'src/backend/commands/explain.c')
-rw-r--r-- | src/backend/commands/explain.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c index bd4e575dbae..5cfc15c3391 100644 --- a/src/backend/commands/explain.c +++ b/src/backend/commands/explain.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994-5, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/explain.c,v 1.142 2005/11/29 01:25:49 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/explain.c,v 1.143 2006/02/05 02:59:16 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -904,9 +904,15 @@ explain_outNode(StringInfo str, appendStringInfo(str, " "); appendStringInfo(str, " -> "); + /* + * Ordinarily we don't pass down our own outer_plan value to our + * child nodes, but in an Append we must, since we might be + * looking at an appendrel indexscan with outer references + * from the member scans. + */ explain_outNode(str, subnode, appendstate->appendplans[j], - NULL, + outer_plan, indent + 3, es); j++; } |