diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-03-27 06:29:49 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-03-27 06:29:49 +0000 |
commit | 926e8a00d38e1873369ab9a24062440c82d7731c (patch) | |
tree | 9034ee995948ac39c0b6dd1606bc1f6213e7c8dd /src/backend/optimizer/path/costsize.c | |
parent | febc9a613cd523de84da883a81e2040c3b1336a6 (diff) | |
download | postgresql-926e8a00d38e1873369ab9a24062440c82d7731c.tar.gz postgresql-926e8a00d38e1873369ab9a24062440c82d7731c.zip |
Add a back-link from IndexOptInfo structs to their parent RelOptInfo
structs. There are many places in the planner where we were passing
both a rel and an index to subroutines, and now need only pass the
index struct. Notationally simpler, and perhaps a tad faster.
Diffstat (limited to 'src/backend/optimizer/path/costsize.c')
-rw-r--r-- | src/backend/optimizer/path/costsize.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c index e6d2c5cd80a..83ac82a60a5 100644 --- a/src/backend/optimizer/path/costsize.c +++ b/src/backend/optimizer/path/costsize.c @@ -49,7 +49,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/optimizer/path/costsize.c,v 1.138 2005/03/06 22:15:04 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/optimizer/path/costsize.c,v 1.139 2005/03/27 06:29:35 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -227,7 +227,6 @@ cost_nonsequential_access(double relpages) * but here we consider the cost of just one pass. * * 'root' is the query root - * 'baserel' is the base relation the index is for * 'index' is the index to be used * 'indexQuals' is the list of applicable qual clauses (implicit AND semantics) * 'is_injoin' is T if we are considering using the index scan as the inside @@ -243,11 +242,11 @@ cost_nonsequential_access(double relpages) */ void cost_index(Path *path, Query *root, - RelOptInfo *baserel, IndexOptInfo *index, List *indexQuals, bool is_injoin) { + RelOptInfo *baserel = index->rel; Cost startup_cost = 0; Cost run_cost = 0; Cost indexStartupCost; |