Manage cost-related info and cost calculation functions for index skip scans.
More...
#include <index_skip_scan_plan.h>
|
| void | CalcCardinality () |
| | DESCRIPTION This method computes the parameters used to calculate the access cost of an INDEX_SKIP_SCAN access path and the number of rows returned. More...
|
| |
Manage cost-related info and cost calculation functions for index skip scans.
◆ IndexSkipScanCost()
◆ CalcCardinality()
| void IndexSkipScanCost::CalcCardinality |
( |
| ) |
|
|
private |
DESCRIPTION This method computes the parameters used to calculate the access cost of an INDEX_SKIP_SCAN access path and the number of rows returned.
NOTES To estimate the size of the groups to read, index statistics from rec_per_key is used. Each equality range decreases number of the groups to read. The total number of processed records from all the groups will be quick_prefix_records if there are equality ranges else it will be the entire table. Number of distinct group is calculated by dividing the number of processed record by the number keys in a group.
Number of processed records is calculated using following formula:
records = number_of_distinct_groups * records_per_group * filtering_effect
where filtering_effect is filtering effect of the range condition.
◆ GetCost()
DESCRIPTION This method computes the access cost of an INDEX_SKIP_SCAN access path and the number of rows returned for the old optimizer.
RETURN Cost estimate
◆ GetCostForHypergraph()
| double IndexSkipScanCost::GetCostForHypergraph |
( |
| ) |
const |
DESCRIPTION This method computes the access cost of an INDEX_SKIP_SCAN access path and the number of rows returned in hypergraph.
RETURN Hypergraph cost value.
◆ GetNumRecords()
| ha_rows IndexSkipScanCost::GetNumRecords |
( |
| ) |
const |
|
inline |
◆ m_cardinality
◆ m_distinct_key_parts
| uint IndexSkipScanCost::m_distinct_key_parts |
|
private |
◆ m_key
| uint IndexSkipScanCost::m_key |
|
private |
◆ m_quick_prefix_records
| ha_rows IndexSkipScanCost::m_quick_prefix_records |
|
private |
◆ m_table
| TABLE* IndexSkipScanCost::m_table |
|
private |
◆ m_trace
◆ m_where_cond
| Item* IndexSkipScanCost::m_where_cond |
|
private |
The documentation for this class was generated from the following files: