1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

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.
This commit is contained in:
Tom Lane
2006-02-05 02:59:17 +00:00
parent 354213c7f4
commit 336a6491aa
8 changed files with 114 additions and 273 deletions

View File

@ -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++;
}