MySQL通过JSON格式查看SQL执行详细步骤

set session optimizer_trace='enabled=on';
[SQL语句]
select * from information_schema.optimizer_trace;