Manual:$wgDebugDumpSql/de-formal

Details
If enabled, all SQL statements are logged to the  channel (Syslog/Monolog level DEBUG) and the  (if also enabled). By default, the  channel log messages go to debug log destination as specified by.

If  is true, the Sql queries are dumped to the html output.