MySQL 8.0.40
Source Code Documentation
SortAheadOrdering Struct Reference

#include <build_interesting_orders.h>

Public Attributes

int ordering_idx
 
hypergraph::NodeMap required_nodes
 
bool aggregates_required
 
bool sort_ahead_only
 True if this ordering can be used for sort-ahead only, and not for sorting after the joining and aggregation are done (that is, sorting for DISTINCT, WINDOW or ORDER BY). More...
 
ORDERorder
 

Member Data Documentation

◆ aggregates_required

bool SortAheadOrdering::aggregates_required

◆ order

ORDER* SortAheadOrdering::order

◆ ordering_idx

int SortAheadOrdering::ordering_idx

◆ required_nodes

hypergraph::NodeMap SortAheadOrdering::required_nodes

◆ sort_ahead_only

bool SortAheadOrdering::sort_ahead_only

True if this ordering can be used for sort-ahead only, and not for sorting after the joining and aggregation are done (that is, sorting for DISTINCT, WINDOW or ORDER BY).

This flag is set for orderings on expressions that have not been added to join->fields, and their availability cannot be relied on at the end of the query execution, as they are not included in the temporary table if there is a materialization step. If an ordering marked as sort-ahead-only is actually useful after aggregation, there is usually an equivalent ordering using expressions that do exist in join->fields, and that can be used instead.


The documentation for this struct was generated from the following file: