Skip to content
← All issues

Readyset Weekly: Issue 5

What’s Slowing Down Your MySQL Queries (And How to Speed Them Up)

Not all slow MySQL queries stem from bad schemas, sometimes it’s a subtle misconfig, missing indexes, or outdated assumptions. Here’s what to check first:

  • Start with EXPLAIN: Check how MySQL plans to execute your query. Flags like ALL (full scan), or NULL in the key mean no index is used.
  • Use SHOW STATUS: It reveals what EXPLAIN misses. High Handler_read_rnd_next values indicate full scans; Select_full_join shows joins missing indexes.
  • Tighten your indexes: Make sure composite indexes match your WHERE clause order. If you're filtering on A and B, an index on (A, B) helps, but (B, A) might not.
  • Check query cache (pre-MySQL 8.0): High Qcache_lowmem_prunes suggests frequent invalidation and low effectiveness.
  • Tune buffers: innodb_buffer_pool_size and join_buffer_size heavily impact performance, especially for reads and joins.
  • Avoid implicit conversions: Type mismatches in WHERE clauses (e.g., string vs. int) can silently bypass indexes.

MySQL won’t always tell you when it’s confused, but with the right observability and a few tuning tweaks, you can cut latency. Or skip the manual work with a platform like Readyset for automatic query caching at the SQL layer.

🔍 What We’re Watching in the Database Ecosystem

Transparent Data Encryption for PostgreSQL Release Candidate is Here! Percona has announced the Release Candidate (RC) for Transparent Data Encryption (TDE) in its Percona Distribution for PostgreSQL 17.4.1-1, marking a significant step toward native, open-source encryption for PostgreSQL.

Scaling 3 Million Tables: How TiDB Powers Atlassian Forge’s SaaS Platform Atlassian has successfully scaled its Forge SaaS platform to support over 3 million tables within a single TiDB cluster, addressing the challenges of a rapidly growing multi-tenant architecture.

Getting AI to write good SQL: Text-to-SQL techniques explained Curious how AI turns plain English into accurate SQL queries? This article from Google Cloud explores how large language models like Gemini tackle schema context, ambiguous questions, and SQL dialects. It’s a quick, insightful read for anyone interested in the future of natural language interfaces for databases.

In Case You Missed It

🎥 Watch the Replay: We had a blast at MySQL Heatwave Summit last month, where we presented our talk “Turbocharge Your MySQL with Readyset - Faster Queries, Lower Costs”. You can watch the full session here. Always happy to chat, reply here or reach out on LinkedIn with any questions!

Get Readyset Weekly in your inbox

One email a week — what shipped, what we learned, and what is worth reading.