MySQL 8.0.29
Source Code Documentation File Reference


double EstimateCostForRefAccess (THD *thd, TABLE *table, unsigned key_idx, double num_output_rows)
void EstimateSortCost (AccessPath *path, ha_rows limit_rows)
void AddCost (THD *thd, const ContainedSubquery &subquery, double num_rows, FilterCost *cost)
 Used internally by EstimateFilterCost() only. More...
FilterCost EstimateFilterCost (THD *thd, double num_rows, Item *condition, Query_block *outer_query_block)
 Estimate the cost of evaluating “condition”, “num_rows” times. More...
void EstimateMaterializeCost (THD *thd, AccessPath *path)
void EstimateAggregateCost (AccessPath *path, const Query_block *query_block)
void EstimateDeleteRowsCost (AccessPath *path)

Function Documentation

◆ AddCost()

void AddCost ( THD thd,
const ContainedSubquery subquery,
double  num_rows,
FilterCost cost 

Used internally by EstimateFilterCost() only.

◆ EstimateAggregateCost()

void EstimateAggregateCost ( AccessPath path,
const Query_block query_block 

◆ EstimateCostForRefAccess()

double EstimateCostForRefAccess ( THD thd,
TABLE table,
unsigned  key_idx,
double  num_output_rows 

◆ EstimateDeleteRowsCost()

void EstimateDeleteRowsCost ( AccessPath path)

◆ EstimateFilterCost()

FilterCost EstimateFilterCost ( THD thd,
double  num_rows,
Item condition,
Query_block outer_query_block 

Estimate the cost of evaluating “condition”, “num_rows” times.

This is a fairly rudimentary estimation, but it includes the cost of any subqueries that may be present and that need evaluation.

◆ EstimateMaterializeCost()

void EstimateMaterializeCost ( THD thd,
AccessPath path 

◆ EstimateSortCost()

void EstimateSortCost ( AccessPath path,
ha_rows  limit_rows