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/optimizer/path/indxpath.c | |
| parent | 354213c7f493596448ca83f13d107a8ef7a08aae (diff) | |
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/optimizer/path/indxpath.c')
| -rw-r--r-- | src/backend/optimizer/path/indxpath.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c index dc93aa6787d..e762ee77f7e 100644 --- a/src/backend/optimizer/path/indxpath.c +++ b/src/backend/optimizer/path/indxpath.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/optimizer/path/indxpath.c,v 1.200 2006/01/29 17:40:00 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/optimizer/path/indxpath.c,v 1.201 2006/02/05 02:59:16 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -129,7 +129,7 @@ static Const *string_to_const(const char *str, Oid datatype); * * 'rel' is the relation for which we want to generate index paths * - * Note: check_partial_indexes() must have been run previously. + * Note: check_partial_indexes() must have been run previously for this rel. */ void create_index_paths(PlannerInfo *root, RelOptInfo *rel) @@ -1290,6 +1290,9 @@ matches_any_index(RestrictInfo *rinfo, RelOptInfo *rel, Relids outer_relids) * negligible startup cost. (True today, but someday we might have to think * harder.) Therefore, there is only one dimension of comparison and so it's * sufficient to return a single "best" path. + * + * Note: create_index_paths() must have been run previously for this rel, + * else the result will always be NULL. */ Path * best_inner_indexscan(PlannerInfo *root, RelOptInfo *rel, |
