Skip to content
← All issues

Readyset Weekly: Issue 52

The Hidden Cost of Slow Queries That Nobody Fixes

Most teams have a version of the same list: queries they know are slow or disproportionately expensive. They show up in logs and dashboards, get tickets, get deprioritized, and get pushed to the next sprint.

The reason they stay unfixed is usually a mix of:

  • The fix spans schema and application code: migrations, backfills, and coordinated deploys across teams
  • The query isn't directly owned: generated by an ORM or buried in a dependency, so changes risk unintended side effects
  • It's slow but within SLOs: latency stays within targets, so it never gets prioritized even as it adds load
  • The cost shows up elsewhere: the team or service generating the query isn't the one dealing with database load or infra spend

Meanwhile, those queries keep running at full cost. The teams that get ahead of this don't wait for the perfect fix. They:

  • Prioritize by total cost, not just latency: rank by frequency × latency to focus on what actually drives load
  • Reduce frequency before rewriting: cache repeated reads, deduplicate requests, and eliminate unnecessary polling
  • Precompute repeated access patterns: move expensive aggregations into materialized views or precomputed tables
  • Align ownership with cost: make query-level cost visible so the team generating the load is responsible for fixing or mitigating it

In practice, much of this work is manual: identifying high-cost queries, deciding what to cache, managing invalidation, and routing traffic correctly. It's effective, but time-consuming and tedious, so it often gets deprioritized. This is where tools like Readyset QueryPilot come in. By sitting in the query path, it continuously analyzes live traffic, identifies high-impact, cacheable queries, and applies caching and routing automatically, without requiring application changes or ongoing manual tuning.

🔍 What We're Watching in the Database Ecosystem

The Hidden Reason Database Debt Is Ten Times Harder to Fix Than Code

Unlike application code, databases carry state, existing data creates inertia against change, dev and production environments diverge, and compliance requirements add friction to every migration. Written by Wen Jie Teo, dev advocate at MongoDB, this piece explains why database problems compound in ways that code problems don't, and why the slow query ticket that's been open for six months probably isn't going anywhere on its own.

In Case You Missed It

Inside MySQL: 20 Years of Source Code, Open Source Contributions, and What Comes Next

Our own Marcelo Altmann, Readyset engineer and MySQL Rockstar 2025, was recently featured in an interview with ODBMS.org. He breaks down what it actually takes to contribute to MySQL's codebase, lessons from 20 years working inside the ecosystem, and why the binary log is evolving far beyond replication into a core primitive for real-time systems. Worth a read if you work with MySQL or care about how replication and the binlog actually behave under the hood.

New on our blog:

Introducing MySQL GTID Support and Zero-Downtime Failover in Readyset

Support for one of our most requested features is live! Readyset now supports GTID-based replication for MySQL, enabling zero-downtime failover so you can redirect Readyset to a new primary without restarting, losing cached state, or letting queries fall through to your database unprotected.

Replication Internals: Decoding the MySQL Binary Log, Part 7 - TABLE_MAP_EVENT: Table Metadata for Row-Based Replication

In Part 7 of our MySQL Replication Internals series, Marcelo decodes the TABLE_MAP_EVENT, the event that maps a numeric table ID to a database name, table name, and column layout before every row event in row-based replication.

Know a database aficionado who'd appreciate this? Forward it their way.

Get Readyset Weekly in your inbox

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