![]()  | 
  
    MySQL 9.5.0
    
   Source Code Documentation 
   | 
 
This class finds disjoint sets of aggregation terms that form prefixes of some non-hash index, and makes row estimates for those sets based on index metadata. More...
Classes | |
| struct | Prefix | 
| A prefix of some key where each key_part corresponds to an aggregation term.  More... | |
Public Member Functions | |
| AggregateRowEstimator (THD *thd, TermArray terms) | |
| AggregateRowEstimator (const AggregateRowEstimator &)=delete | |
| AggregateRowEstimator & | operator= (const AggregateRowEstimator &)=delete | 
| double | MakeNextEstimate (THD *thd) | 
| Get the next row estimate.  More... | |
| const MutableOverflowBitset & | GetConsumedTerms () const | 
| Get the set of terms for which we have found an index.  More... | |
Static Public Attributes | |
| static constexpr double | kNoEstimate = -1.0 | 
| Used to indicate that no more suitable indexes could be found.  More... | |
Private Member Functions | |
| TermArray::iterator | FindField (const Field *field) const | 
| Find an Item_field pointing to 'field' in 'm_terms', if there is one.  More... | |
Private Attributes | |
| TermArray | m_terms | 
| The aggregation terms.  More... | |
| MutableOverflowBitset | m_consumed_terms | 
| The set of terms mapped to an index so far.  More... | |
| Mem_root_array< Prefix * > | m_prefixes | 
| The index prefixes we found for 'm_terms'.  More... | |
This class finds disjoint sets of aggregation terms that form prefixes of some non-hash index, and makes row estimates for those sets based on index metadata.
| anonymous_namespace{cost_model.cc}::AggregateRowEstimator::AggregateRowEstimator | ( | THD * | thd, | 
| TermArray | terms | ||
| ) | 
| thd | Current thread. | 
| terms | The aggregation terms. | 
      
  | 
  delete | 
      
  | 
  inlineprivate | 
Find an Item_field pointing to 'field' in 'm_terms', if there is one.
| field | The field we look for. | 
      
  | 
  inline | 
Get the set of terms for which we have found an index.
Bit number corresponds to position in the 'terms' argument to the constructor.
| double anonymous_namespace{cost_model.cc}::AggregateRowEstimator::MakeNextEstimate | ( | THD * | thd | ) | 
Get the next row estimate.
We make the estimate as follows:
      
  | 
  delete | 
      
  | 
  staticconstexpr | 
Used to indicate that no more suitable indexes could be found.
      
  | 
  private | 
The set of terms mapped to an index so far.
      
  | 
  private | 
The index prefixes we found for 'm_terms'.
      
  | 
  private | 
The aggregation terms.