TLDR Dev · QUICK LINKS

A QUERY ON A 3-BILLION-ROW TABLE TOOK 100 MINUTES: ONE ADDED LINE MADE IT 40MS

explainanalyze.com19 min read

Summary from the TLDR Dev newsletter

A real MySQL query fell from 1h43m to 40ms when a chain-scoping predicate was pushed into a derived table, avoiding materialization for 6.57 million stores and a walk over 491 million index entries without changing the schema.