Server System Variables 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: For more information about the syntax of this variable and the optimizer behaviors that it controls, see Section 8.9.2, “Switchable Optimizations” . This variable controls optimizer tracing. For details, see MySQL Internals: Tracing the Optimizer. This variable enables or disables selected optimizer tracing features. For details, see MySQL Internals: Tracing the Optimizer. • optimizer_trace_limit • optimizer_trace_features • optimizer_trace 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 Command-Line Format --optimizer-trace-limit=# Command-Line Format --optimizer-trace-features=value System Variable optimizer_trace_features Scope Global, Session Dynamic Yes SET_VAR  Hint Applies No Type String 853 Command-Line Format --optimizer-trace=value System Variable optimizer_trace Scope Global, Session Dynamic Yes SET_VAR  Hint Applies No Type String