Manual:$wgDebugDumpSql/en

Details
If true, SQL statements are dumped to the  (debug log).

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