PostgreSQL Source Code
git master
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
c
d
g
h
i
k
l
m
p
r
s
t
Functions
Variables
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
c
d
f
h
i
n
o
p
r
s
t
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
blcost.c
Go to the documentation of this file.
1
/*-------------------------------------------------------------------------
2
*
3
* blcost.c
4
* Cost estimate function for bloom indexes.
5
*
6
* Copyright (c) 2016-2025, PostgreSQL Global Development Group
7
*
8
* IDENTIFICATION
9
* contrib/bloom/blcost.c
10
*
11
*-------------------------------------------------------------------------
12
*/
13
#include "
postgres.h
"
14
15
#include "
bloom.h
"
16
#include "
utils/selfuncs.h
"
17
18
/*
19
* Estimate cost of bloom index scan.
20
*/
21
void
22
blcostestimate
(
PlannerInfo
*
root
,
IndexPath
*path,
double
loop_count,
23
Cost
*indexStartupCost,
Cost
*indexTotalCost,
24
Selectivity
*indexSelectivity,
double
*indexCorrelation,
25
double
*indexPages)
26
{
27
IndexOptInfo
*
index
= path->
indexinfo
;
28
GenericCosts
costs = {0};
29
30
/* We have to visit all index tuples anyway */
31
costs.
numIndexTuples
=
index
->tuples;
32
33
/* Use generic estimate */
34
genericcostestimate
(
root
, path, loop_count, &costs);
35
36
*indexStartupCost = costs.
indexStartupCost
;
37
*indexTotalCost = costs.
indexTotalCost
;
38
*indexSelectivity = costs.
indexSelectivity
;
39
*indexCorrelation = costs.
indexCorrelation
;
40
*indexPages = costs.
numIndexPages
;
41
}
blcostestimate
void blcostestimate(PlannerInfo *root, IndexPath *path, double loop_count, Cost *indexStartupCost, Cost *indexTotalCost, Selectivity *indexSelectivity, double *indexCorrelation, double *indexPages)
Definition:
blcost.c:22
bloom.h
Cost
double Cost
Definition:
nodes.h:257
Selectivity
double Selectivity
Definition:
nodes.h:256
postgres.h
root
tree ctl root
Definition:
radixtree.h:1857
genericcostestimate
void genericcostestimate(PlannerInfo *root, IndexPath *path, double loop_count, GenericCosts *costs)
Definition:
selfuncs.c:6881
selfuncs.h
GenericCosts
Definition:
selfuncs.h:124
GenericCosts::indexSelectivity
Selectivity indexSelectivity
Definition:
selfuncs.h:128
GenericCosts::indexStartupCost
Cost indexStartupCost
Definition:
selfuncs.h:126
GenericCosts::indexCorrelation
double indexCorrelation
Definition:
selfuncs.h:129
GenericCosts::indexTotalCost
Cost indexTotalCost
Definition:
selfuncs.h:127
GenericCosts::numIndexPages
double numIndexPages
Definition:
selfuncs.h:132
GenericCosts::numIndexTuples
double numIndexTuples
Definition:
selfuncs.h:133
IndexOptInfo
Definition:
pathnodes.h:1140
IndexPath
Definition:
pathnodes.h:1845
IndexPath::indexinfo
IndexOptInfo * indexinfo
Definition:
pathnodes.h:1847
PlannerInfo
Definition:
pathnodes.h:220
index
Definition:
type.h:96
contrib
bloom
blcost.c
Generated on Mon Apr 21 2025 06:13:14 for PostgreSQL Source Code by
1.9.4