Readyset Weekly: Issue 39
Optimizing MySQL Query Execution Plans for Faster Performance
When MySQL performance degrades, the root cause is often hiding in the execution plan, not the query text itself. At scale, cost-based decisions that look reasonable on small data sets can compound into a steady drain on CPU and memory.
Here are a few practical ways to improve MySQL execution plans:
- Always validate assumptions with
EXPLAIN ANALYZE:EXPLAINshows the chosen plan, butEXPLAIN ANALYZEshows what actually happened at runtime. Large gaps between estimated and actual rows usually indicate stale statistics or poorly aligned indexes. - Make composite indexes match real filters: MySQL relies on left-most prefixes, so column order matters. An index that looks correct on paper can be useless if it doesn't align with your most selective predicates.
- Watch for silent full scans:
type: ALLin execution plans or highHandler_read_rnd_nextvalues usually indicate table scans. These often result from missing indexes, implicit type conversions, or filters that are too low-selectivity to be efficient at scale. - Reduce planning overhead for high-frequency queries: At very high QPS, repeated parsing and optimization can become measurable CPU overhead, even for otherwise fast queries.
- Tune memory to avoid disk spill paths: Insufficient join or sort buffers force execution into temporary tables and disk I/O. When plans spill unexpectedly, latency spikes even if indexes are otherwise correct.
Execution plan tuning helps, but real scale often comes from removing redundant database work altogether, especially for high-frequency queries under load.
🔍 What We're Watching in the Database Ecosystem
Four Data Infrastructure Shifts Defining AI Success in 2026
AI success in 2026 will hinge less on model choice and more on data infrastructure fundamentals like access patterns, governance, and hybrid architectures. As AI systems move into production, data systems that cannot serve fast, consistent access can become the limiting factor.
OpenAI is preparing to launch ads in ChatGPT's free and Go tiers. Business Insider reports that the move comes as the company looks to offset an estimated $1.4 trillion in long-term data center and infrastructure spending commitments.
Databases in 2025: A Year in Review
Andy Pavlo's 2025 database retrospective covers a wide sweep of the year's major themes, from PostgreSQL's continued momentum to database M&A, new file formats, and the growing influence of AI on data systems. It's a grounded look at what actually moved the database ecosystem forward in 2025, and what remains unresolved.
In Case You Missed It
FOSDEM Is Right Around the Corner!
The Readyset team is excited to be in Brussels next week for pre-FOSDEM MySQL Belgian Days and FOSDEM. If you're attending or in the area, we'd love to connect.
Stop by these sessions at MySQL Belgian Days and say hi:
- Marcelo's talk, "Fast on Hits, Faster on Misses: JOIN Execution for MySQL Workloads in Readyset" on January 29 at 11 am
- Vini's talk, "Bringing Flamegraphs to MySQL Query Optimization" on January 30 at 1:50 pm
The full schedule is available here.
We'll also be at the MySQL, MariaDB and Friends Community Dinner on Friday, January 30 (registration required) or at our Database and Drinks happy hour on Saturday, January 31st (waitlist available).
Get Readyset Weekly in your inbox
One email a week — what shipped, what we learned, and what is worth reading.