|
string | anonymous_namespace{join_optimizer.cc}::PrintAccessPath (const AccessPath &path, const JoinHypergraph &graph, const char *description_for_trace) |
|
void | anonymous_namespace{join_optimizer.cc}::PrintJoinOrder (const AccessPath *path, string *join_order) |
| Used by optimizer trace to print join order of join paths. More...
|
|
AccessPath * | anonymous_namespace{join_optimizer.cc}::CreateMaterializationPath (THD *thd, JOIN *join, AccessPath *path, TABLE *temp_table, Temp_table_param *temp_table_param, bool copy_items) |
| Sets up an access path for materializing the results returned from a path in a temporary table. More...
|
|
AccessPath * | anonymous_namespace{join_optimizer.cc}::GetSafePathToSort (THD *thd, JOIN *join, AccessPath *path, bool need_rowid) |
|
SecondaryEngineFlags | anonymous_namespace{join_optimizer.cc}::EngineFlags (const THD *thd) |
| Lists the current secondary engine flags in use. More...
|
|
secondary_engine_modify_access_path_cost_t | anonymous_namespace{join_optimizer.cc}::SecondaryEngineCostHook (const THD *thd) |
| Gets the secondary storage engine cost modification function, if any. More...
|
|
Item_func_match * | anonymous_namespace{join_optimizer.cc}::GetSargableFullTextPredicate (const Predicate &predicate) |
| Returns the MATCH function of a predicate that can be pushed down to a full-text index. More...
|
|
bool | anonymous_namespace{join_optimizer.cc}::IsDeleteStatement (const THD *thd) |
| Is the current statement a DELETE statement? More...
|
|
bool | anonymous_namespace{join_optimizer.cc}::IsUpdateStatement (const THD *thd) |
| Is the current statement a DELETE statement? More...
|
|
void | anonymous_namespace{join_optimizer.cc}::FindAppliedAndSubsumedPredicatesForRangeScan (THD *thd, KEY *key, unsigned used_key_parts, unsigned num_exact_key_parts, TABLE *table, OverflowBitset tree_applied_predicates, OverflowBitset tree_subsumed_predicates, const JoinHypergraph &graph, OverflowBitset *applied_predicates_out, OverflowBitset *subsumed_predicates_out) |
|
bool | anonymous_namespace{join_optimizer.cc}::CollectPossibleRangeScans (THD *thd, SEL_TREE *tree, RANGE_OPT_PARAM *param, OverflowBitset tree_applied_predicates, OverflowBitset tree_subsumed_predicates, const JoinHypergraph &graph, Mem_root_array< PossibleRangeScan > *possible_scans) |
|
double | anonymous_namespace{join_optimizer.cc}::EstimateOutputRowsFromRangeTree (THD *thd, const RANGE_OPT_PARAM ¶m, ha_rows total_rows, const Mem_root_array< PossibleRangeScan > &possible_scans, const JoinHypergraph &graph, OverflowBitset predicates, string *trace) |
| Based on estimates for all the different range scans (which cover different but potentially overlapping combinations of predicates), try to find an estimate for the number of rows scanning the given table, with all predicates applied. More...
|
|
AccessPath * | anonymous_namespace{join_optimizer.cc}::FindCheapestIndexRangeScan (THD *thd, SEL_TREE *tree, RANGE_OPT_PARAM *param, bool prefer_clustered_primary_key_scan, bool *inexact) |
| From a collection of index scans, find the single cheapest one and generate an AccessPath for it. More...
|
|
int | anonymous_namespace{join_optimizer.cc}::WasPushedDownToRef (Item *condition, const KeypartForRef *keyparts, unsigned num_keyparts) |
|
bool | anonymous_namespace{join_optimizer.cc}::ContainsSubqueries (Item *item_arg) |
|
bool | anonymous_namespace{join_optimizer.cc}::HasConstantEqualityForField (const Mem_root_array< SargablePredicate > &sargable_predicates, const Field *field) |
| Do we have a sargable predicate which checks if "field" is equal to a constant? More...
|
|
bool | anonymous_namespace{join_optimizer.cc}::IsSubsumableFullTextPredicate (Item_func *condition) |
|
bool | anonymous_namespace{join_optimizer.cc}::IsLimitHintPushableToFullTextSearch (const Item_func_match *match, const JoinHypergraph &graph, uint64_t fulltext_predicates) |
|
bool | anonymous_namespace{join_optimizer.cc}::LateralDependenciesAreSatisfied (int node_idx, NodeMap tables, const JoinHypergraph &graph) |
| Checks if the table given by "node_idx" has all its lateral dependencies satisfied by the set of tables given by "tables". More...
|
|
NodeMap | anonymous_namespace{join_optimizer.cc}::FindReachableTablesFrom (NodeMap tables, const JoinHypergraph &graph) |
| Find the set of tables we can join directly against, given that we have the given set of tables on one of the sides (effectively the same concept as DPhyp's “neighborhood”). More...
|
|
bool | anonymous_namespace{join_optimizer.cc}::PartiallyResolvedParameterization (NodeMap parameter_tables, NodeMap other_side) |
|
bool | anonymous_namespace{join_optimizer.cc}::DisallowParameterizedJoinPath (AccessPath *left_path, AccessPath *right_path, NodeMap left, NodeMap right, NodeMap left_reachable, NodeMap right_reachable) |
| Decide whether joining the two given paths would create a disallowed parameterized path. More...
|
|
bool | anonymous_namespace{join_optimizer.cc}::IsEmptyJoin (const RelationalExpression::Type join_type, bool left_is_empty, bool right_is_empty) |
| Checks if the result of a join is empty, given that it is known that one or both of the join legs always produces an empty result. More...
|
|
void | anonymous_namespace{join_optimizer.cc}::MoveDegenerateJoinConditionToFilter (THD *thd, Query_block *query_block, const JoinPredicate **edge, AccessPath **right_path) |
| If the ON clause of a left join only references tables on the right side of the join, pushing the condition into the right side is a valid thing to do. More...
|
|
AccessPath * | anonymous_namespace{join_optimizer.cc}::DeduplicateForSemijoin (THD *thd, AccessPath *path, Item **semijoin_group, int semijoin_group_size) |
| Build an access path that deduplicates its input on a certain grouping. More...
|
|
uint32_t | anonymous_namespace{join_optimizer.cc}::AddFlag (uint32_t flags, FuzzyComparisonResult flag) |
|
bool | anonymous_namespace{join_optimizer.cc}::HasFlag (uint32_t flags, FuzzyComparisonResult flag) |
|
PathComparisonResult | CompareAccessPaths (const LogicalOrderings &orderings, const AccessPath &a, const AccessPath &b, OrderingSet obsolete_orderings) |
|
AccessPath | anonymous_namespace{join_optimizer.cc}::MakeSortPathWithoutFilesort (THD *thd, AccessPath *child, ORDER *order, int ordering_state, int num_where_predicates) |
|
bool | anonymous_namespace{join_optimizer.cc}::CheckSupportedQuery (THD *thd) |
|
AccessPath * | anonymous_namespace{join_optimizer.cc}::CreateMaterializationOrStreamingPath (THD *thd, JOIN *join, AccessPath *path, bool need_rowid, bool copy_items) |
| Set up an access path for streaming or materializing through a temporary table. More...
|
|
bool | anonymous_namespace{join_optimizer.cc}::IsMaterializationPath (const AccessPath *path) |
|
bool | anonymous_namespace{join_optimizer.cc}::IsImmediateDeleteCandidate (const Table_ref *table_ref, const Query_block *query_block) |
| Is this DELETE target table a candidate for being deleted from immediately, while scanning the result of the join? It only checks if it is a candidate for immediate delete. More...
|
|
void | anonymous_namespace{join_optimizer.cc}::AddFieldsToTmpSet (Item *item, TABLE *table) |
| Adds all fields of "table" that are referenced from "item" to table->tmp_set. More...
|
|
bool | anonymous_namespace{join_optimizer.cc}::IsImmediateUpdateCandidate (const Table_ref *table_ref, int node_idx, const JoinHypergraph &graph, table_map target_tables) |
| Is this UPDATE target table a candidate for being updated immediately, while scanning the result of the join? It only checks if it is a candidate for immediate update. More...
|
|
table_map | anonymous_namespace{join_optimizer.cc}::FindUpdateDeleteTargetTables (const Query_block *query_block) |
| Finds all the target tables of an UPDATE or DELETE statement. More...
|
|
table_map | anonymous_namespace{join_optimizer.cc}::FindImmediateUpdateDeleteCandidates (const JoinHypergraph &graph, table_map target_tables, bool is_delete) |
| Finds all of the target tables of an UPDATE or DELETE statement that are candidates from being updated or deleted from immediately while scanning the results of the join, without need to buffer the row IDs in a temporary table for delayed update/delete after the join has completed. More...
|
|
NodeMap | anonymous_namespace{join_optimizer.cc}::FindFullTextSearchedTables (const JoinHypergraph &graph) |
|
bool | anonymous_namespace{join_optimizer.cc}::IsSargableFullTextIndexPredicate (Item *condition) |
|
uint64_t | anonymous_namespace{join_optimizer.cc}::FindSargableFullTextPredicates (const JoinHypergraph &graph) |
|
bool | anonymous_namespace{join_optimizer.cc}::InjectCastNodes (JoinHypergraph *graph) |
|
void | anonymous_namespace{join_optimizer.cc}::EnableFullTextCoveringIndexes (const Query_block *query_block) |
|
AccessPath * | anonymous_namespace{join_optimizer.cc}::CreateZeroRowsForEmptyJoin (JOIN *join, const char *cause) |
| Creates a ZERO_ROWS access path for an always empty join result, or a ZERO_ROWS_AGGREGATED in case of an implicitly grouped query. More...
|
|
AccessPath | anonymous_namespace{join_optimizer.cc}::CreateStreamingAggregationPath (THD *thd, AccessPath *path, JOIN *join, bool rollup, double row_estimate, string *trace) |
| Creates an AGGREGATE AccessPath, possibly with an intermediary STREAM node if one is needed. More...
|
|
void | anonymous_namespace{join_optimizer.cc}::SplitHavingCondition (THD *thd, Item *cond, Item **having_cond, Item **having_cond_wf) |
|
void | anonymous_namespace{join_optimizer.cc}::ApplyHavingCondition (THD *thd, Item *having_cond, Query_block *query_block, const char *description_for_trace, string *trace, Prealloced_array< AccessPath *, 4 > *root_candidates, CostingReceiver *receiver) |
|
AccessPath | anonymous_namespace{join_optimizer.cc}::MakeSortPathForDistinct (THD *thd, AccessPath *root_path, int ordering_idx, bool aggregation_is_unordered, const LogicalOrderings &orderings, LogicalOrderings::StateIndex ordering_state) |
|
JoinHypergraph::Node * | anonymous_namespace{join_optimizer.cc}::FindNodeWithTable (JoinHypergraph *graph, TABLE *table) |
|
Prealloced_array< AccessPath *, 4 > | anonymous_namespace{join_optimizer.cc}::ApplyDistinctAndOrder (THD *thd, const CostingReceiver &receiver, const LogicalOrderings &orderings, bool aggregation_is_unordered, int order_by_ordering_idx, int distinct_ordering_idx, const Mem_root_array< SortAheadOrdering > &sort_ahead_orderings, FunctionalDependencySet fd_set, Query_block *query_block, bool need_rowid, bool force_sort_rowids, Prealloced_array< AccessPath *, 4 > root_candidates, string *trace) |
|
static AccessPath * | anonymous_namespace{join_optimizer.cc}::ApplyWindow (THD *thd, AccessPath *root_path, Window *window, JOIN *join, bool need_rowid_for_window) |
|
static int | anonymous_namespace{join_optimizer.cc}::FindBestOrderingForWindow (JOIN *join, const LogicalOrderings &orderings, FunctionalDependencySet fd_set, const Mem_root_array< SortAheadOrdering > &sort_ahead_orderings, Bounds_checked_array< bool > finished_windows, Bounds_checked_array< bool > tmp_buffer, int first_ordering_idx, int second_ordering_idx, Bounds_checked_array< bool > included_windows) |
| Find the ordering that allows us to process the most unprocessed windows. More...
|
|
AccessPath * | anonymous_namespace{join_optimizer.cc}::MakeSortPathAndApplyWindows (THD *thd, JOIN *join, AccessPath *root_path, int ordering_idx, ORDER *order, const LogicalOrderings &orderings, Bounds_checked_array< bool > windows_this_iteration, FunctionalDependencySet fd_set, int num_where_predicates, bool need_rowid_for_window, int single_window_idx, Bounds_checked_array< bool > finished_windows, int *num_windows_left) |
|
static Prealloced_array< AccessPath *, 4 > | ApplyWindowFunctions (THD *thd, const CostingReceiver &receiver, const LogicalOrderings &orderings, FunctionalDependencySet fd_set, bool aggregation_is_unordered, int order_by_ordering_idx, int distinct_ordering_idx, const JoinHypergraph &graph, const Mem_root_array< SortAheadOrdering > &sort_ahead_orderings, Query_block *query_block, int num_where_predicates, bool need_rowid, Prealloced_array< AccessPath *, 4 > root_candidates, string *trace) |
| Apply window functions. More...
|
|
static bool | CompatibleTypesForIndexLookup (Item_func_eq *eq_item, Field *field, Item *value) |
| Find out if "value" has a type which is compatible with "field" so that it can be used for an index lookup if there is an index on "field". More...
|
|
static void | PossiblyAddSargableCondition (THD *thd, Item *item, TABLE *force_table, int predicate_index, bool is_join_condition, JoinHypergraph *graph, string *trace) |
| Find out whether “item” is a sargable condition; if so, add it to: More...
|
|
void | FindSargablePredicates (THD *thd, string *trace, JoinHypergraph *graph) |
|
static bool | ComesFromSameMultiEquality (Item *cond1, Item_eq_base *cond2) |
|
static void | CacheCostInfoForJoinConditions (THD *thd, const Query_block *query_block, JoinHypergraph *graph, string *trace) |
| For each edge, cache some information for each of its join conditions. More...
|
|
AccessPath * | FindBestQueryPlan (THD *thd, Query_block *query_block, string *trace) |
| Find the lowest-cost plan (which hopefully is also the cheapest to execute) of all the legal ways to execute the query. More...
|
|