MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Query Planner

Classes

class  Loose_scan_opt

Functions

void get_partial_join_cost (JOIN *join, uint n_tables, double *read_time_arg, double *record_count_arg)
bool Optimize_table_order::choose_table_order ()

Detailed Description

Function Documentation

bool Optimize_table_order::choose_table_order ( )

Entry point to table join order optimization. For further description, see class header and private function headers.

Returns
false if successful, true if error

Selects and invokes a search strategy for an optimal query join order.

The function checks user-configurable parameters that control the search strategy for an optimal plan, selects the search method and then invokes it. Each specific optimization procedure stores the final optimal plan in the array 'join->best_positions', and the cost of the plan in 'join->best_read'. The function can be invoked to produce a plan for all tables in the query (in this case, the const tables are usually filtered out), or it can be invoked to produce a plan for a materialization of a semijoin nest. Set a non-NULL emb_sjm_nest pointer when producing a plan for a semijoin nest to be materialized and a NULL pointer when producing a full query plan.

Returns
false if successful, true if error

< The tables involved in order selection

Definition at line 1088 of file sql_planner.cc.

Here is the call graph for this function: