Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit926e8a0

Browse files
committed
Add a back-link from IndexOptInfo structs to their parent RelOptInfo
structs. There are many places in the planner where we were passingboth a rel and an index to subroutines, and now need only pass theindex struct. Notationally simpler, and perhaps a tad faster.
1 parentfebc9a6 commit926e8a0

File tree

11 files changed

+95
-141
lines changed

11 files changed

+95
-141
lines changed

‎src/backend/optimizer/path/costsize.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
* Portions Copyright (c) 1994, Regents of the University of California
5050
*
5151
* IDENTIFICATION
52-
* $PostgreSQL: pgsql/src/backend/optimizer/path/costsize.c,v 1.138 2005/03/06 22:15:04 tgl Exp $
52+
* $PostgreSQL: pgsql/src/backend/optimizer/path/costsize.c,v 1.139 2005/03/27 06:29:35 tgl Exp $
5353
*
5454
*-------------------------------------------------------------------------
5555
*/
@@ -227,7 +227,6 @@ cost_nonsequential_access(double relpages)
227227
* but here we consider the cost of just one pass.
228228
*
229229
* 'root' is the query root
230-
* 'baserel' is the base relation the index is for
231230
* 'index' is the index to be used
232231
* 'indexQuals' is the list of applicable qual clauses (implicit AND semantics)
233232
* 'is_injoin' is T if we are considering using the index scan as the inside
@@ -243,11 +242,11 @@ cost_nonsequential_access(double relpages)
243242
*/
244243
void
245244
cost_index(Path*path,Query*root,
246-
RelOptInfo*baserel,
247245
IndexOptInfo*index,
248246
List*indexQuals,
249247
boolis_injoin)
250248
{
249+
RelOptInfo*baserel=index->rel;
251250
Coststartup_cost=0;
252251
Costrun_cost=0;
253252
CostindexStartupCost;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp