MDEV-406 allows to execute a statement, and collect data for ANALYZE output. This task is about having ANALYZE printed in the slow query log, like originally envisioned in MDEV-407 ( MDEV-407 only implemented EXPLAIN in the slow query log).
User interface question:
MDEV-407 introduced a switch:
Should we keep the option name just print tabular ANALYZE output instead of tabular EXPLAIN output?
Or, introduce another flag:
What if the user specifies both explain and analyze? Should we print both or just print analyze (since it is a superset of explain output)? Is it acceptable to always print analyze output?
There is the same question for formatting the log. 10.0 shows EXPLAIN outputs in slow query log like this:
Should we keep "explain:" or introduce "analyze:" ?