24#ifndef SQL_JOIN_OPTIMIZER_BUILD_INTERESTING_ORDERS_H_
25#define SQL_JOIN_OPTIMIZER_BUILD_INTERESTING_ORDERS_H_
119 int *order_by_ordering_idx,
int *group_by_ordering_idx,
ORDER * BuildSortAheadOrdering(THD *thd, const LogicalOrderings *orderings, Ordering ordering)
Definition: build_interesting_orders.cc:286
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< FullTextIndexInfo > *fulltext_searches, std::string *trace)
Build all structures we need for keeping track of interesting orders.
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:384
Definition: item_func.h:3396
Definition: interesting_orders.h:314
int StateIndex
Definition: interesting_orders.h:427
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:159
This class represents a query block, aka a query specification, which is a query consisting of a SELE...
Definition: sql_lex.h:1156
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
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:92
LogicalOrderings::StateIndex reverse_order
Definition: build_interesting_orders.h:95
int key_idx
Definition: build_interesting_orders.h:94
LogicalOrderings::StateIndex reverse_order_without_extended_key_parts
Definition: build_interesting_orders.h:96
LogicalOrderings::StateIndex forward_order
Definition: build_interesting_orders.h:95
TABLE * table
Definition: build_interesting_orders.h:93
Definition: build_interesting_orders.h:101
LogicalOrderings::StateIndex order
Definition: build_interesting_orders.h:103
Item_func_match * match
Definition: build_interesting_orders.h:102
A struct containing a join hypergraph of a single query block, encapsulating the constraints given by...
Definition: make_join_hypergraph.h:77
Definition: build_interesting_orders.h:45
ORDER * order
Definition: build_interesting_orders.h:87
bool aggregates_required
Definition: build_interesting_orders.h:73
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:84
hypergraph::NodeMap required_nodes
Definition: build_interesting_orders.h:69
int ordering_idx
Definition: build_interesting_orders.h:47