content_image/688080.jpg content_image/688078.jpg content_image/688077.jpg
use_invisible_indexes={on|off} 

The optimizer_switch  system variable enables control over optimizer behavior. The value of this variable is a set of flags, each of which has a value of on  or off  to indicate whether the corresponding optimizer behavior is enabled or disabled. This variable has global and session values and can be changed at runtime. The global default can be set at server startup. 

To see the current set of optimizer flags, select the variable value: 

mysql> SELECT @@optimizer_switch\G *************************** 1. row *************************** @@optimizer_switch: index_merge=on,index_merge_union=on, index_merge_sort_union=on,index_merge_intersection=on, engine_condition_pushdown=on,index_condition_pushdown=on, mrr=on,mrr_cost_based=on,block_nested_loop=on, batched_key_access=off,materialization=on,semijoin=on, loosescan=on,firstmatch=on,duplicateweedout=on, subquery_materialization_cost_based=on, use_index_extensions=on,condition_fanout_filter=on, derived_merge=on,use_invisible_indexes=off,skip_scan=on, hash_join=on,subquery_to_derived=off, prefer_ordering_index=on,hypergraph_optimizer=off, derived_condition_pushdown=on 

For more information about the syntax of this variable and the optimizer behaviors that it controls, see Section 8.9.2, “Switchable Optimizations” . 

• optimizer_trace 

<img src='content_image/688080.jpg'>

This variable controls optimizer tracing. For details, see MySQL Internals: Tracing the Optimizer. 

• optimizer_trace_features 

<img src='content_image/688078.jpg'>

This variable enables or disables selected optimizer tracing features. For details, see MySQL Internals: Tracing the Optimizer. 

• optimizer_trace_limit 

<img src='content_image/688077.jpg'>

