Performance & databases

Slow query logs: the query costing you most is not the slowest

Open a slow query log, sort by duration, and you will find a report that runs for twelve seconds twice a day. Meanwhile a 40-millisecond query running eighty thousand times an hour is quietly consuming far more of your database than that report ever will. Ranking by total time rather than worst case is the single change that makes a slow query log useful.

Published 4 November 2026 · Qcramai Security