Looking at a trace in the mysql command-line
client can be cumbersome (though the pager less
command makes it better). An alternative can be to send the trace
to a file:
SELECT TRACE INTO DUMPFILE <filename>
FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
Then pass this file to some JSON viewer. For example, the JsonView
Firefox add-on shows objects in colours and allows object
collapsing/expanding. Use INTO DUMPFILE
and not
INTO OUTFILE
because the latter escapes
newlines. Also, have the @@end_markers_in_json
variable off: when it's on, the trace is more human readable but
not JSON compliant.