Most slow MySQL queries announce themselves if you know where to look. You do not need a monitoring dashboard or a database consultant — you need EXPLAIN, and five signals in its output that each point at a different fix.
1. type: ALL — the full table scan
This is the loudest signal. MySQL read every row of the table no matter what your WHERE said. On a lookup table with 50 rows, nobody cares. On a table with 500,000 rows, this is your whole problem. The fix is almost always an index on the column in the WHERE clause. Run the query again after adding it and watch type move to ref.
2. key: NULL — no index was used at all
Different from signal 1 in one important way: sometimes possible_keys lists an index and key is still NULL. That means the index exists and MySQL refused it. The usual reason is the query itself — a function wrapped around the indexed column, like DATE(created_at) = '2026-11-20', or a comparison against a value of the wrong type. Rewrite the condition so the index can serve it: a date range instead of DATE(), matching types on both sides.
3. Extra: Using filesort — MySQL sorted it by hand
The index found the rows, but they came back in the wrong order, so MySQL sorted them itself — in memory if it fits, on disk if it does not. The cure is a composite index that covers the filter and the sort in one order: equality columns first, then the sort column. An index on (user_id, created_at) serves WHERE user_id = 1234 ORDER BY created_at DESC with no sort at all — MySQL reads the index backwards and stops after your LIMIT.
4. rows is huge and the result is tiny
rows is an estimate, not a count, but the ratio tells the story. If MySQL expects to examine 498,000 rows to hand you back 20, the plan is wrong even if the query eventually finishes. Compare rows with the actual result size. A ratio in the thousands means a missing index or a condition the optimizer cannot use. When the estimate itself looks suspicious, EXPLAIN ANALYZE (MySQL 8.0.18+) runs the query and reports the real numbers.
5. OFFSET grows the pain on every page
This one does not show up as a single bad column — it shows up as a query that is fast on page 1 and slow on page 1,000. LIMIT 20 OFFSET 20000 still reads and discards 20,000 rows. The fix is keyset pagination: remember the last id you showed and ask for the next rows after it with WHERE id > 20000 ORDER BY id LIMIT 20. The index does the work, and page 1,000 costs the same as page 1.
The habit
None of these signals needs a rewrite of your application. The habit is small: when a query is slow, run EXPLAIN before you change anything, read these five signals, and make the smallest change that moves one of them. I wrote up the full walkthrough — finding the slow queries in the slow query log, reading every column, and verifying each fix — here:
https://rajadevsolutions.online/blog/how-to-fix-slow-mysql-queries-with-explain
Fix the plan first. The query is usually innocent.
