MySQL 9.1.0
Source Code Documentation
|
A builder class for constructing REF (or EQ_REF) AccessPath objects. More...
Classes | |
struct | KeyMatch |
Result type for FindKeyMatch(). More... | |
struct | Lookup |
Result type for BuildLookup(). More... | |
struct | PredicateAnalysis |
Result type of AnalyzePredicates(). More... | |
Public Types | |
enum class | ProposeResult { kNoPathFound , kPathsFound , kError } |
Return value of ProposePath(). More... | |
Public Member Functions | |
RefAccessBuilder & | set_receiver (CostingReceiver *val) |
RefAccessBuilder & | set_table (TABLE *val) |
RefAccessBuilder & | set_node_idx (int val) |
RefAccessBuilder & | set_key_idx (unsigned val) |
RefAccessBuilder & | set_force_num_output_rows_after_filter (double val) |
RefAccessBuilder & | set_reverse (bool val) |
RefAccessBuilder & | set_allowed_parameter_tables (table_map val) |
RefAccessBuilder & | set_ordering_idx (int val) |
ProposeResult | ProposePath () const |
Popose an AccessPath if we found a suitable match betweeen the key and the sargable predicates. More... | |
Private Member Functions | |
THD * | thd () const |
JoinHypergraph * | graph () const |
KeyMatch | FindKeyMatch () const |
Go through each of the sargable predicates and see how many key parts we can match. More... | |
std::optional< Lookup > | BuildLookup (const KeyMatch &key_match) const |
Create Index_lookup for this ref, and set it up based on the chosen keyparts. More... | |
std::optional< PredicateAnalysis > | AnalyzePredicates (const KeyMatch &key_match) const |
Find which predicates that are covered by this index access. More... | |
AccessPath | MakePath (const KeyMatch &key_match, const Lookup &lookup, double num_output_rows) const |
Create the REF/EQ_REF access path. More... | |
Private Attributes | |
CostingReceiver * | m_receiver |
The receiver for the current Query_block. More... | |
TABLE * | m_table |
The table for which we want to create an AcessPath. More... | |
int | m_node_idx |
The hypergraph node. More... | |
unsigned | m_key_idx |
The key for the REF/EQ_REF AccessPath. More... | |
double | m_force_num_output_rows_after_filter {kUnknownRowCount} |
A row estimate from the range optimizer (or kUnknownRowCount if there is none. More... | |
bool | m_reverse {false} |
True if we wish to do a reverse scan. More... | |
table_map | m_allowed_parameter_tables {0} |
The set of tables that we may use as parameters for the REF AccessPath. More... | |
int | m_ordering_idx |
The output ordering of the AccessPath we propose. More... | |
A builder class for constructing REF (or EQ_REF) AccessPath objects.
Doing so in a single function would give an excessively long function with an overly long parameter list.
|
strong |
|
private |
Find which predicates that are covered by this index access.
|
private |
Create Index_lookup for this ref, and set it up based on the chosen keyparts.
|
private |
Go through each of the sargable predicates and see how many key parts we can match.
|
inlineprivate |
|
private |
Create the REF/EQ_REF access path.
RefAccessBuilder::ProposeResult anonymous_namespace{join_optimizer.cc}::RefAccessBuilder::ProposePath | ( | ) | const |
Popose an AccessPath if we found a suitable match betweeen the key and the sargable predicates.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
private |
The set of tables that we may use as parameters for the REF AccessPath.
|
private |
A row estimate from the range optimizer (or kUnknownRowCount if there is none.
|
private |
The key for the REF/EQ_REF AccessPath.
|
private |
The hypergraph node.
|
private |
The output ordering of the AccessPath we propose.
|
private |
The receiver for the current Query_block.
|
private |
True if we wish to do a reverse scan.
|
private |
The table for which we want to create an AcessPath.