24 #define DEFAULT_SEQ_PAGE_COST 1.0
25 #define DEFAULT_RANDOM_PAGE_COST 4.0
26 #define DEFAULT_CPU_TUPLE_COST 0.01
27 #define DEFAULT_CPU_INDEX_TUPLE_COST 0.005
28 #define DEFAULT_CPU_OPERATOR_COST 0.0025
29 #define DEFAULT_PARALLEL_TUPLE_COST 0.1
30 #define DEFAULT_PARALLEL_SETUP_COST 1000.0
33 #define DEFAULT_RECURSIVE_WORKTABLE_FACTOR 10.0
34 #define DEFAULT_EFFECTIVE_CACHE_SIZE 524288
82 double loop_count,
bool partial_path);
85 Path *bitmapqual,
double loop_count);
96 bool trivial_pathtarget);
111 List *pathkeys,
int disabled_nodes,
112 Cost input_cost,
double tuples,
int width,
113 Cost comparison_cost,
int sort_mem,
114 double limit_tuples);
117 int input_disabled_nodes,
118 Cost input_startup_cost,
Cost input_total_cost,
119 double input_tuples,
int width,
Cost comparison_cost,
int sort_mem,
120 double limit_tuples);
123 List *pathkeys,
int n_streams,
124 int input_disabled_nodes,
125 Cost input_startup_cost,
Cost input_total_cost,
128 int input_disabled_nodes,
129 Cost input_startup_cost,
Cost input_total_cost,
130 double tuples,
int width);
133 int numGroupCols,
double numGroups,
135 int input_disabled_nodes,
136 Cost input_startup_cost,
Cost input_total_cost,
137 double input_tuples,
double input_width);
140 int input_disabled_nodes,
141 Cost input_startup_cost,
Cost input_total_cost,
142 double input_tuples);
144 int numGroupCols,
double numGroups,
146 int input_disabled_nodes,
147 Cost input_startup_cost,
Cost input_total_cost,
148 double input_tuples);
162 List *outersortkeys,
List *innersortkeys,
181 int input_disabled_nodes,
182 Cost input_startup_cost,
Cost input_total_cost,
198 List *param_clauses);
204 List *restrict_clauses);
221 Path *bitmapqual,
double loop_count,
222 Cost *cost_p,
double *tuples_p);
void set_namedtuplestore_size_estimates(PlannerInfo *root, RelOptInfo *rel)
PGDLLIMPORT bool enable_tidscan
PGDLLIMPORT bool enable_partitionwise_join
void final_cost_hashjoin(PlannerInfo *root, HashPath *path, JoinCostWorkspace *workspace, JoinPathExtraData *extra)
double index_pages_fetched(double tuples_fetched, BlockNumber pages, double index_pages, PlannerInfo *root)
PGDLLIMPORT int max_parallel_workers_per_gather
PGDLLIMPORT bool enable_parallel_hash
void cost_bitmap_tree_node(Path *path, Cost *cost, Selectivity *selec)
double get_parameterized_baserel_size(PlannerInfo *root, RelOptInfo *rel, List *param_clauses)
double get_parameterized_joinrel_size(PlannerInfo *root, RelOptInfo *rel, Path *outer_path, Path *inner_path, SpecialJoinInfo *sjinfo, List *restrict_clauses)
void final_cost_mergejoin(PlannerInfo *root, MergePath *path, JoinCostWorkspace *workspace, JoinPathExtraData *extra)
void initial_cost_mergejoin(PlannerInfo *root, JoinCostWorkspace *workspace, JoinType jointype, List *mergeclauses, Path *outer_path, Path *inner_path, List *outersortkeys, List *innersortkeys, JoinPathExtraData *extra)
void cost_agg(Path *path, PlannerInfo *root, AggStrategy aggstrategy, const AggClauseCosts *aggcosts, int numGroupCols, double numGroups, List *quals, int input_disabled_nodes, Cost input_startup_cost, Cost input_total_cost, double input_tuples, double input_width)
void compute_semi_anti_join_factors(PlannerInfo *root, RelOptInfo *joinrel, RelOptInfo *outerrel, RelOptInfo *innerrel, JoinType jointype, SpecialJoinInfo *sjinfo, List *restrictlist, SemiAntiJoinFactors *semifactors)
PGDLLIMPORT bool enable_async_append
void set_baserel_size_estimates(PlannerInfo *root, RelOptInfo *rel)
void cost_windowagg(Path *path, PlannerInfo *root, List *windowFuncs, WindowClause *winclause, int input_disabled_nodes, Cost input_startup_cost, Cost input_total_cost, double input_tuples)
PGDLLIMPORT bool enable_nestloop
void cost_functionscan(Path *path, PlannerInfo *root, RelOptInfo *baserel, ParamPathInfo *param_info)
void cost_material(Path *path, int input_disabled_nodes, Cost input_startup_cost, Cost input_total_cost, double tuples, int width)
PGDLLIMPORT bool enable_incremental_sort
void cost_bitmap_heap_scan(Path *path, PlannerInfo *root, RelOptInfo *baserel, ParamPathInfo *param_info, Path *bitmapqual, double loop_count)
void cost_tidrangescan(Path *path, PlannerInfo *root, RelOptInfo *baserel, List *tidrangequals, ParamPathInfo *param_info)
PathTarget * set_pathtarget_cost_width(PlannerInfo *root, PathTarget *target)
void set_function_size_estimates(PlannerInfo *root, RelOptInfo *rel)
PGDLLIMPORT bool enable_material
PGDLLIMPORT bool enable_presorted_aggregate
void final_cost_nestloop(PlannerInfo *root, NestPath *path, JoinCostWorkspace *workspace, JoinPathExtraData *extra)
void cost_gather_merge(GatherMergePath *path, PlannerInfo *root, RelOptInfo *rel, ParamPathInfo *param_info, int input_disabled_nodes, Cost input_startup_cost, Cost input_total_cost, double *rows)
void cost_recursive_union(Path *runion, Path *nrterm, Path *rterm)
void cost_tablefuncscan(Path *path, PlannerInfo *root, RelOptInfo *baserel, ParamPathInfo *param_info)
void cost_sort(Path *path, PlannerInfo *root, List *pathkeys, int disabled_nodes, Cost input_cost, double tuples, int width, Cost comparison_cost, int sort_mem, double limit_tuples)
void initial_cost_hashjoin(PlannerInfo *root, JoinCostWorkspace *workspace, JoinType jointype, List *hashclauses, Path *outer_path, Path *inner_path, JoinPathExtraData *extra, bool parallel_hash)
PGDLLIMPORT bool enable_seqscan
void cost_samplescan(Path *path, PlannerInfo *root, RelOptInfo *baserel, ParamPathInfo *param_info)
void cost_gather(GatherPath *path, PlannerInfo *root, RelOptInfo *rel, ParamPathInfo *param_info, double *rows)
@ CONSTRAINT_EXCLUSION_OFF
@ CONSTRAINT_EXCLUSION_PARTITION
@ CONSTRAINT_EXCLUSION_ON
PGDLLIMPORT bool enable_mergejoin
void set_cte_size_estimates(PlannerInfo *root, RelOptInfo *rel, double cte_rows)
void set_joinrel_size_estimates(PlannerInfo *root, RelOptInfo *rel, RelOptInfo *outer_rel, RelOptInfo *inner_rel, SpecialJoinInfo *sjinfo, List *restrictlist)
double compute_gather_rows(Path *path)
void cost_qual_eval_node(QualCost *cost, Node *qual, PlannerInfo *root)
void cost_namedtuplestorescan(Path *path, PlannerInfo *root, RelOptInfo *baserel, ParamPathInfo *param_info)
void cost_seqscan(Path *path, PlannerInfo *root, RelOptInfo *baserel, ParamPathInfo *param_info)
void cost_valuesscan(Path *path, PlannerInfo *root, RelOptInfo *baserel, ParamPathInfo *param_info)
void cost_incremental_sort(Path *path, PlannerInfo *root, List *pathkeys, int presorted_keys, int input_disabled_nodes, Cost input_startup_cost, Cost input_total_cost, double input_tuples, int width, Cost comparison_cost, int sort_mem, double limit_tuples)
void cost_qual_eval(QualCost *cost, List *quals, PlannerInfo *root)
void initial_cost_nestloop(PlannerInfo *root, JoinCostWorkspace *workspace, JoinType jointype, Path *outer_path, Path *inner_path, JoinPathExtraData *extra)
PGDLLIMPORT bool enable_gathermerge
void set_result_size_estimates(PlannerInfo *root, RelOptInfo *rel)
PGDLLIMPORT bool enable_sort
void cost_group(Path *path, PlannerInfo *root, int numGroupCols, double numGroups, List *quals, int input_disabled_nodes, Cost input_startup_cost, Cost input_total_cost, double input_tuples)
void cost_resultscan(Path *path, PlannerInfo *root, RelOptInfo *baserel, ParamPathInfo *param_info)
double compute_bitmap_pages(PlannerInfo *root, RelOptInfo *baserel, Path *bitmapqual, double loop_count, Cost *cost_p, double *tuples_p)
PGDLLIMPORT bool enable_indexscan
void cost_bitmap_and_node(BitmapAndPath *path, PlannerInfo *root)
void set_subquery_size_estimates(PlannerInfo *root, RelOptInfo *rel)
PGDLLIMPORT Cost disable_cost
void set_foreign_size_estimates(PlannerInfo *root, RelOptInfo *rel)
PGDLLIMPORT bool enable_partitionwise_aggregate
void cost_tidscan(Path *path, PlannerInfo *root, RelOptInfo *baserel, List *tidquals, ParamPathInfo *param_info)
PGDLLIMPORT int constraint_exclusion
void cost_subplan(PlannerInfo *root, SubPlan *subplan, Plan *plan)
void cost_merge_append(Path *path, PlannerInfo *root, List *pathkeys, int n_streams, int input_disabled_nodes, Cost input_startup_cost, Cost input_total_cost, double tuples)
PGDLLIMPORT bool enable_bitmapscan
PGDLLIMPORT bool enable_indexonlyscan
void cost_subqueryscan(SubqueryScanPath *path, PlannerInfo *root, RelOptInfo *baserel, ParamPathInfo *param_info, bool trivial_pathtarget)
void cost_append(AppendPath *apath)
void cost_ctescan(Path *path, PlannerInfo *root, RelOptInfo *baserel, ParamPathInfo *param_info)
PGDLLIMPORT bool enable_hashagg
void cost_bitmap_or_node(BitmapOrPath *path, PlannerInfo *root)
void set_tablefunc_size_estimates(PlannerInfo *root, RelOptInfo *rel)
void cost_index(IndexPath *path, PlannerInfo *root, double loop_count, bool partial_path)
PGDLLIMPORT bool enable_memoize
void set_values_size_estimates(PlannerInfo *root, RelOptInfo *rel)
PGDLLIMPORT bool enable_partition_pruning
PGDLLIMPORT bool enable_parallel_append
PGDLLIMPORT bool enable_hashjoin