24#ifndef SQL_JOIN_OPTIMIZER_BUILD_INTERESTING_ORDERS_H_
25#define SQL_JOIN_OPTIMIZER_BUILD_INTERESTING_ORDERS_H_
137 int *order_by_ordering_idx,
int *group_by_ordering_idx,
ORDER * BuildSortAheadOrdering(THD *thd, const LogicalOrderings *orderings, Ordering ordering)
Definition: build_interesting_orders.cc:288
void BuildInterestingOrders(THD *thd, JoinHypergraph *graph, Query_block *query_block, LogicalOrderings *orderings, Mem_root_array< SortAheadOrdering > *sort_ahead_orderings, int *order_by_ordering_idx, int *group_by_ordering_idx, int *distinct_ordering_idx, Mem_root_array< ActiveIndexInfo > *active_indexes, Mem_root_array< SpatialDistanceScanInfo > *spatial_indexes, Mem_root_array< FullTextIndexInfo > *fulltext_searches)
Build all structures we need for keeping track of interesting orders.
Definition: build_interesting_orders.cc:453
Ordering ReduceFinalOrdering(THD *thd, const LogicalOrderings &orderings, int ordering_idx)
Creates a reduced ordering for the ordering or grouping specified by "ordering_idx".
Definition: build_interesting_orders.cc:386
Definition: item_func.h:3465
Definition: interesting_orders.h:315
int StateIndex
Definition: interesting_orders.h:426
A typesafe replacement for DYNAMIC_ARRAY.
Definition: mem_root_array.h:426
Represents a (potentially interesting) ordering, rollup or (non-rollup) grouping.
Definition: interesting_orders.h:160
This class represents a query block, aka a query specification, which is a query consisting of a SELE...
Definition: sql_lex.h:1163
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
Tracks which tuple streams follow which orders, and in particular whether they follow interesting ord...
uint64_t NodeMap
Since our graphs can never have more than 61 tables, node sets and edge lists are implemented using 6...
Definition: node_map.h:40
Definition: build_interesting_orders.h:99
LogicalOrderings::StateIndex reverse_order
Definition: build_interesting_orders.h:102
int key_idx
Definition: build_interesting_orders.h:101
LogicalOrderings::StateIndex reverse_order_without_extended_key_parts
Definition: build_interesting_orders.h:103
LogicalOrderings::StateIndex forward_order
Definition: build_interesting_orders.h:102
TABLE * table
Definition: build_interesting_orders.h:100
Definition: build_interesting_orders.h:119
LogicalOrderings::StateIndex order
Definition: build_interesting_orders.h:121
Item_func_match * match
Definition: build_interesting_orders.h:120
A struct containing a join hypergraph of a single query block, encapsulating the constraints given by...
Definition: make_join_hypergraph.h:88
Definition: build_interesting_orders.h:52
ORDER * order
Definition: build_interesting_orders.h:94
bool aggregates_required
Definition: build_interesting_orders.h:80
bool sort_ahead_only
True if this ordering can be used for sort-ahead only, and not for sorting after the joining and aggr...
Definition: build_interesting_orders.h:91
hypergraph::NodeMap required_nodes
Definition: build_interesting_orders.h:76
int ordering_idx
Definition: build_interesting_orders.h:54
Definition: build_interesting_orders.h:108
LogicalOrderings::StateIndex forward_order
Definition: build_interesting_orders.h:111
int key_idx
Definition: build_interesting_orders.h:110
TABLE * table
Definition: build_interesting_orders.h:109
double coordinates[5]
Definition: build_interesting_orders.h:114