Log every SQL query while you debug a slow page

Turn on Adobe Commerce’s query log, reproduce the slow page, then read the log instead of guessing. Turn it off when you’re done. It writes a lot. If you then need to know which code issues the statements, a profiler such as SPX can point at the method that runs them.

bin/magento dev:query-log:enable
bin/magento dev:query-log:disable

The log lands in var/debug/db.log (Adobe’s logging reference).

Vishwas Bhatnagar

More quick notes

More