A daily report scanning 1.2 million rows to return two hundred. Why neither obvious index helped, what the composite one costs, and the two answers I turned down.
The rows column in an EXPLAIN is read as a measurement — “this query looked at 8,412 rows”. It is the optimiser’s guess, derived from index statistics, and…
Two pages read the same column and only one of them was right. Dumping, rewriting and reloading 52,000 rows without turning every accent into a question mark.