Go to the source code of this file.
|
AccessPath * | get_best_ror_intersect (THD *thd, const RANGE_OPT_PARAM *param, TABLE *table, bool index_merge_intersect_allowed, SEL_TREE *tree, double cost_est, bool force_index_merge_result, bool reuse_handler) |
|
void | trace_basic_info_rowid_intersection (THD *thd, const AccessPath *path, const RANGE_OPT_PARAM *param, Opt_trace_object *trace_object) |
|
void | trace_basic_info_rowid_union (THD *thd, const AccessPath *path, const RANGE_OPT_PARAM *param, Opt_trace_object *trace_object) |
|
void | add_keys_and_lengths_rowid_intersection (const AccessPath *path, String *key_names, String *used_lengths) |
|
void | add_keys_and_lengths_rowid_union (const AccessPath *path, String *key_names, String *used_lengths) |
|
OverflowBitset | get_needed_fields (const RANGE_OPT_PARAM *param) |
|
ROR_SCAN_INFO * | make_ror_scan (const RANGE_OPT_PARAM *param, int idx, SEL_ROOT *sel_root, OverflowBitset needed_fields) |
|
void | find_intersect_order (Mem_root_array< ROR_SCAN_INFO * > *ror_scans, OverflowBitset needed_fields, MEM_ROOT *mem_root) |
| Sort indexes in an order that is likely to be a good index merge intersection order. More...
|
|
AccessPath * | MakeRowIdOrderedIndexScanAccessPath (ROR_SCAN_INFO *scan, TABLE *table, KEY_PART *used_key_part, bool reuse_handler, MEM_ROOT *mem_root) |
|
void | dbug_dump_rowid_intersection (int indent, bool verbose, const Mem_root_array< AccessPath * > &children) |
|
void | dbug_dump_rowid_union (int indent, bool verbose, const Mem_root_array< AccessPath * > &children) |
|
◆ add_keys_and_lengths_rowid_intersection()
void add_keys_and_lengths_rowid_intersection |
( |
const AccessPath * |
path, |
|
|
String * |
key_names, |
|
|
String * |
used_lengths |
|
) |
| |
◆ add_keys_and_lengths_rowid_union()
◆ dbug_dump_rowid_intersection()
◆ dbug_dump_rowid_union()
◆ find_intersect_order()
Sort indexes in an order that is likely to be a good index merge intersection order.
After running this function ror_scans are ordered according to this strategy:
1) Minimize the number of indexes that must be used in the intersection. I.e., the index covering most fields not already covered by other indexes earlier in the sort order is picked first. 2) When multiple indexes cover equally many uncovered fields, the index with lowest E(Number of rows) is chosen.
Note that all permutations of index ordering are not tested, so this function may not find the optimal order.
- Parameters
-
[in,out] | ror_scans | ror scans to be used in index merge intersection |
| needed_fields | Bitmask of fields needed by the query. |
| mem_root | memory root to be used. |
◆ get_best_ror_intersect()
AccessPath * get_best_ror_intersect |
( |
THD * |
thd, |
|
|
const RANGE_OPT_PARAM * |
param, |
|
|
TABLE * |
table, |
|
|
bool |
index_merge_intersect_allowed, |
|
|
SEL_TREE * |
tree, |
|
|
double |
cost_est, |
|
|
bool |
force_index_merge_result, |
|
|
bool |
reuse_handler |
|
) |
| |
◆ get_needed_fields()
◆ make_ror_scan()
◆ MakeRowIdOrderedIndexScanAccessPath()
◆ trace_basic_info_rowid_intersection()
◆ trace_basic_info_rowid_union()