-
Notifications
You must be signed in to change notification settings - Fork 54
/
cardinality_hooks.h
32 lines (27 loc) · 1.11 KB
/
cardinality_hooks.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef CARDINALITY_HOOKS_H
#define CARDINALITY_HOOKS_H
#include "optimizer/planner.h"
#include "utils/selfuncs.h"
extern estimate_num_groups_hook_type prev_estimate_num_groups_hook;
/* Cardinality estimation hooks */
extern void aqo_set_baserel_rows_estimate(PlannerInfo *root, RelOptInfo *rel);
extern double aqo_get_parameterized_baserel_size(PlannerInfo *root,
RelOptInfo *rel,
List *param_clauses);
extern void aqo_set_joinrel_size_estimates(PlannerInfo *root, RelOptInfo *rel,
RelOptInfo *outer_rel,
RelOptInfo *inner_rel,
SpecialJoinInfo *sjinfo,
List *restrictlist);
extern double aqo_get_parameterized_joinrel_size(PlannerInfo *root,
RelOptInfo *rel,
Path *outer_path,
Path *inner_path,
SpecialJoinInfo *sjinfo,
List *restrict_clauses);
extern double aqo_estimate_num_groups_hook(PlannerInfo *root, List *groupExprs,
Path *subpath,
RelOptInfo *grouped_rel,
List **pgset,
EstimationInfo *estinfo);
#endif /* CARDINALITY_HOOKS_H */