PostgreSQL Source Code  git master
blcost.c File Reference
#include "postgres.h"
#include "bloom.h"
#include "fmgr.h"
#include "utils/selfuncs.h"
Include dependency graph for blcost.c:

Go to the source code of this file.

Functions

void blcostestimate (PlannerInfo *root, IndexPath *path, double loop_count, Cost *indexStartupCost, Cost *indexTotalCost, Selectivity *indexSelectivity, double *indexCorrelation, double *indexPages)
 

Function Documentation

◆ blcostestimate()

void blcostestimate ( PlannerInfo root,
IndexPath path,
double  loop_count,
Cost indexStartupCost,
Cost indexTotalCost,
Selectivity indexSelectivity,
double *  indexCorrelation,
double *  indexPages 
)

Definition at line 23 of file blcost.c.

27 {
28  IndexOptInfo *index = path->indexinfo;
29  GenericCosts costs = {0};
30 
31  /* We have to visit all index tuples anyway */
32  costs.numIndexTuples = index->tuples;
33 
34  /* Use generic estimate */
35  genericcostestimate(root, path, loop_count, &costs);
36 
37  *indexStartupCost = costs.indexStartupCost;
38  *indexTotalCost = costs.indexTotalCost;
39  *indexSelectivity = costs.indexSelectivity;
40  *indexCorrelation = costs.indexCorrelation;
41  *indexPages = costs.numIndexPages;
42 }
tree ctl root
Definition: radixtree.h:1884
void genericcostestimate(PlannerInfo *root, IndexPath *path, double loop_count, GenericCosts *costs)
Definition: selfuncs.c:6544
Selectivity indexSelectivity
Definition: selfuncs.h:127
Cost indexStartupCost
Definition: selfuncs.h:125
double indexCorrelation
Definition: selfuncs.h:128
Cost indexTotalCost
Definition: selfuncs.h:126
double numIndexPages
Definition: selfuncs.h:131
double numIndexTuples
Definition: selfuncs.h:132
IndexOptInfo * indexinfo
Definition: pathnodes.h:1699
Definition: type.h:95

References genericcostestimate(), GenericCosts::indexCorrelation, IndexPath::indexinfo, GenericCosts::indexSelectivity, GenericCosts::indexStartupCost, GenericCosts::indexTotalCost, GenericCosts::numIndexPages, GenericCosts::numIndexTuples, and root.

Referenced by blhandler().