Skip to content
← All issues

Readyset Weekly: Issue 15

How to Keep Transactions Short and Scoped

Long transactions are a common source of lock contention, replication lag, and unpredictable performance in high-traffic databases. Here are a few tips for keeping transactions short and tightly scoped:

  • Locks live for the duration of a transaction: Every row you read or write stays locked until commit. Longer transactions increase the risk of blocking others, especially for frequently accessed rows or tables. (MySQL & Postgres)
  • Autocommit helps avoid lingering locks: For simple statements (such as INSERTs and SELECTs), autocommit prevents lingering locks. Only wrap multiple statements in a transaction when atomicity is required. (MySQL & Postgres)
  • Minimize client round-trips: Avoid starting a transaction and waiting for user input or external service calls before finishing it. (MySQL & Postgres)
  • Avoid idle-in-transaction states: Enforce timeouts with a pooler, and use pg_stat_activity to spot long-lived connections. (Postgres)
  • Keep transactions focused: Separate reads from writes unless snapshot consistency is required, doing so shortens lock time and improves cacheability. (MySQL & Postgres)

Shorter transactions mean fewer locks, faster queries, and fewer deadlocks. Readyset takes it further by caching repeat reads off the critical path, thereby reducing the load on the primary.

🔍 What We're Watching in the Database Ecosystem

How Anthropic teams use Claude Code

Anthropic teams now rely on Claude Code to debug infrastructure issues, write pull requests, and automate onboarding, all from a natural language CLI. From security to data engineering, Claude is speeding up workflows and reducing manual overhead.

Balancing Innovation & Trust: How Enterprises Can Navigate AI-Driven Database Management

As AI systems become increasingly autonomous, trust in the database layer is more crucial than ever. This piece makes the case for reliability, observability, and transparency as non-negotiables, especially in mission-critical, AI-powered workloads.

Stop Building AI Tools Backwards

Hazel Weakly argues that AI tools often deskill us by automating what humans do best: reasoning, collaboration, and problem solving. She makes the case for human-centered AI that augments rather than shortcuts our workflows.

In Case You Missed It

QueryPilot Public Beta for MySQL is Now Open

Last week, Tanmay and Mike provided a behind-the-scenes look at QueryPilot and its implications for the future of database scaling. From automated query caching to zero-config workload optimization, the demo is packed with practical insights on how QueryPilot identifies and accelerates your slowest queries with zero manual effort. Check it out here (live demo starts at 6:55).

Using Postgres? We're currently accepting signups for our Postgres Private Preview. For early access when it's available, join the waitlist here.

Get Readyset Weekly in your inbox

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