mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
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.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.137 2002/11/15 02:50:07 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.138 2002/11/24 21:52:13 tgl Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Most of the read functions for plan nodes are tested. (In fact, they
|
||||
@ -1824,13 +1824,6 @@ _readIndexPath(void)
|
||||
token = pg_strtok(&length); /* now read it */
|
||||
local_node->indexscandir = (ScanDirection) atoi(token);
|
||||
|
||||
token = pg_strtok(&length); /* get :joinrelids */
|
||||
local_node->joinrelids = toIntList(nodeRead(true));
|
||||
|
||||
token = pg_strtok(&length); /* get :alljoinquals */
|
||||
token = pg_strtok(&length); /* now read it */
|
||||
local_node->alljoinquals = strtobool(token);
|
||||
|
||||
token = pg_strtok(&length); /* get :rows */
|
||||
token = pg_strtok(&length); /* now read it */
|
||||
local_node->rows = atof(token);
|
||||
|
Reference in New Issue
Block a user