PostgreSQL Source Code git master
Loading...
Searching...
No Matches
blcost.c File Reference
#include "postgres.h"
#include "bloom.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 22 of file blcost.c.

26{
28 GenericCosts costs = {0};
29
30 /* We have to visit all index tuples anyway */
31 costs.numIndexTuples = index->tuples;
32
33 /* As in btcostestimate, count only the metapage as non-leaf */
34 costs.numNonLeafPages = 1;
35
36 /* Use generic estimate */
37 genericcostestimate(root, path, loop_count, &costs);
38
39 *indexStartupCost = costs.indexStartupCost;
40 *indexTotalCost = costs.indexTotalCost;
41 *indexSelectivity = costs.indexSelectivity;
42 *indexCorrelation = costs.indexCorrelation;
44}
static int fb(int x)
tree ctl root
Definition radixtree.h:1857
void genericcostestimate(PlannerInfo *root, IndexPath *path, double loop_count, GenericCosts *costs)
Definition selfuncs.c:7398
Selectivity indexSelectivity
Definition selfuncs.h:135
BlockNumber numNonLeafPages
Definition selfuncs.h:143
Cost indexStartupCost
Definition selfuncs.h:133
double indexCorrelation
Definition selfuncs.h:136
Cost indexTotalCost
Definition selfuncs.h:134
double numIndexPages
Definition selfuncs.h:139
double numIndexTuples
Definition selfuncs.h:140
IndexOptInfo * indexinfo
Definition pathnodes.h:2056
Definition type.h:96

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

Referenced by blhandler().