Go to the source code of this file.
|
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, const Query_block *outer_query_block) |
| Estimate the cost of evaluating “condition”, “num_rows” times. More...
|
|
FilterCost | EstimateFilterCost (THD *thd, double num_rows, const Mem_root_array< ContainedSubquery > &contained_subqueries) |
| A cheaper overload of EstimateFilterCost() that assumes that all contained subqueries have already been extracted (ie., it skips the walking, which can be fairly expensive). More...
|
|
double | EstimateCostForRefAccess (THD *thd, TABLE *table, unsigned key_idx, double num_output_rows) |
|
void | EstimateSortCost (AccessPath *path) |
|
void | EstimateMaterializeCost (THD *thd, AccessPath *path) |
|
void | EstimateAggregateCost (AccessPath *path, const Query_block *query_block, std::string *trace=nullptr) |
| Estimate costs and result row count for an aggregate operation. More...
|
|
void | EstimateDeleteRowsCost (AccessPath *path) |
|
void | EstimateUpdateRowsCost (AccessPath *path) |
|
void | EstimateStreamCost (AccessPath *path) |
| Estimate the costs and row count for a STREAM AccessPath. More...
|
|
void | EstimateLimitOffsetCost (AccessPath *path) |
| Estimate the costs and row count for a LIMIT_OFFSET AccessPath. More...
|
|
void | EstimateWindowCost (AccessPath *path) |
| Estimate the costs and row count for a WINDOW AccessPath. More...
|
|
double | FindOutputRowsForJoin (double left_rows, double right_rows, const JoinPredicate *edge) |
|
◆ AddCost()
Used internally by EstimateFilterCost() only.
◆ EstimateAggregateCost()
Estimate costs and result row count for an aggregate operation.
- Parameters
-
[in,out] | path | The AGGREGATE path. |
[in] | query_block | The Query_block to which 'path' belongs. |
[in,out] | trace | Optimizer trace text. |
◆ EstimateCostForRefAccess()
double EstimateCostForRefAccess |
( |
THD * |
thd, |
|
|
TABLE * |
table, |
|
|
unsigned |
key_idx, |
|
|
double |
num_output_rows |
|
) |
| |
◆ EstimateDeleteRowsCost()
◆ EstimateFilterCost() [1/2]
A cheaper overload of EstimateFilterCost() that assumes that all contained subqueries have already been extracted (ie., it skips the walking, which can be fairly expensive).
This data is typically computed by FindContainedSubqueries().
◆ EstimateFilterCost() [2/2]
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.
◆ EstimateLimitOffsetCost()
Estimate the costs and row count for a LIMIT_OFFSET AccessPath.
◆ EstimateMaterializeCost()
◆ EstimateSortCost()
◆ EstimateStreamCost()
Estimate the costs and row count for a STREAM AccessPath.
◆ EstimateUpdateRowsCost()
◆ EstimateWindowCost()
Estimate the costs and row count for a WINDOW AccessPath.
◆ FindOutputRowsForJoin()
double FindOutputRowsForJoin |
( |
double |
left_rows, |
|
|
double |
right_rows, |
|
|
const JoinPredicate * |
edge |
|
) |
| |
|
inline |
◆ kAggregateOneRowCost
constexpr double kAggregateOneRowCost = 0.1 |
|
constexpr |
◆ kApplyOneFilterCost
constexpr double kApplyOneFilterCost = 0.1 |
|
constexpr |
◆ kHashBuildOneRowCost
constexpr double kHashBuildOneRowCost = 0.1 |
|
constexpr |
◆ kHashProbeOneRowCost
constexpr double kHashProbeOneRowCost = 0.1 |
|
constexpr |
◆ kHashReturnOneRowCost
constexpr double kHashReturnOneRowCost = 0.07 |
|
constexpr |
◆ kMaterializeOneRowCost
constexpr double kMaterializeOneRowCost = 0.1 |
|
constexpr |
◆ kMaxItemLengthEstimate
constexpr size_t kMaxItemLengthEstimate = 4096 |
|
constexpr |
When we make cost estimates, we use this as the maximal length the values we get from evaluating an Item (in bytes).
Actual values of e.g. blobs may be much longer, but even so we use this as an upper limit when doing cost calculations. (For context,
- See also
- Item::max_length .)
◆ kRowEstimateFallback
constexpr ha_rows kRowEstimateFallback = 1000 |
|
constexpr |
A fallback cardinality estimate that is used in case the storage engine cannot provide one (like for table functions).
It's a fairly arbitrary non-zero value.
◆ kSortOneRowCost
constexpr double kSortOneRowCost = 0.1 |
|
constexpr |
◆ kWindowOneRowCost
constexpr double kWindowOneRowCost = 0.1 |
|
constexpr |