MySQL Internals Manual/Tracing the Optimizer/ System Variables Controlling the Trace

8.2 System Variables Controlling the Trace

A brief overview from "mysqld --verbose --help":

--optimizer-trace=name Controls tracing of the Optimizer: --optimizer-trace-features=name Enables/disables tracing of selected features of the Optimizer: optimizer_trace_features=option=val[,option=val...], where option is one of {greedy_search, range_optimizer, dynamic_range, repeated_subselect} and val is one of {on, off, default} --optimizer-trace-limit=# Maximum number of shown optimizer traces --optimizer-trace-max-mem-size=# Maximum allowed cumulated size of stored optimizer traces --optimizer-trace-offset=# Offset of first optimizer trace to show; see manual --end-markers-in-json=# In JSON output ("EXPLAIN FORMAT=JSON" and optimizer trace), if set to 1, repeats the structure's key (if it has one) near the closing bracket

Those options are described in more detail later in this section.