Skip to content
← All issues

Readyset Weekly: Issue 21

How Partitioning Prevents Database Bottlenecks

As tables grow, even well-indexed queries can slow to a crawl. Partitioning splits a large table into smaller, more manageable chunks. That way, the database only scans what is relevant. Done right, it is one of the simplest ways to cut latency and reduce load.

Here are some practical ways to use it:

  • Partition by time: For logs, events, or financial data, split by day, week, or month. This keeps inserts fast, simplifies archiving, and makes data retention policies easy to manage.
  • Partition by key: If queries often filter on customer_id or tenant_id, use that column as the partition key. This way, scans stay focused on the relevant slice of data instead of the entire table.
  • Reduce write contention: Partitioning spreads inserts and updates across partitions, which lowers the chance of lock conflicts on hot rows.
  • Keep it lean: Avoid creating hundreds of partitions. Start with a few dozen and monitor query plans. Too many partitions can overwhelm the planner and hurt performance instead of helping it.
  • Archive smartly: Dropping a partition is nearly instant, while deleting millions of rows and vacuuming can be slow and resource-intensive.

Partitioning adds some complexity, but for time-series, multi-tenant, or other high-volume workloads, it can head off bottlenecks before they appear. We have also seen it work best when combined with caching, which keeps query plans lean and repeat queries fast.

🔍 What We're Watching in the Database Ecosystem

Metabase's datastack report 2025

Metabase surveyed 300+ companies on their data stacks and how AI is reshaping workflows. The report offers a clear snapshot of current industry practices and priorities.

Data engineering and software engineering are converging

ClickHouse outlines eight principles for building developer-friendly data systems, from Git-based version control to local-first workflows. It is a solid framework for rethinking how developers interact with modern data infrastructure.

AI code assistants make developers more efficient at creating security problems

Apiiro analyzed code from thousands of Fortune 50 developers and found that AI-assisted coding tools boost output 3-4x but also introduce 10x more security issues. The takeaway: if companies adopt AI coding at scale, they must scale security practices in parallel.

In Case You Missed It

Readyset Now Supports SQL Window Functions

We've added support for SQL Window Functions, enabling cached running totals, rankings, moving averages, and more without changes to your application code. Because Readyset's streaming dataflow updates only what has changed, you get real-time speed with full SQL power.

Get Readyset Weekly in your inbox

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