Introducing rdst: The Client-Side SQL Performance Toolkit

9 min read

10 days ago

Introducing rdst: The Client-Side SQL Performance Toolkit

Readyset has always been about making database scaling effortless. Today, we’re extending that mission from the server to the developer’s terminal with rdst, a production-native, AI-powered CLI that helps teams write better queries, diagnose performance issues, and close the loop on caching, all before bad queries ever reach production.

The Database Scaling Problem Is a Query Problem

Every engineering team eventually hits the same wall: the database can’t keep up. Latency spikes. CPU climbs. The on-call page fires at 2 AM. And more often than not, the root cause isn’t the database itself – it’s the queries running on it.

The industry response has historically been reactive and fragmented. Buy a bigger box. Bolt on a Redis layer and hope the invalidation logic doesn’t bite you. Ship slow queries to a DBA who may or may not have context on what the application is trying to do. Or worse, throw the EXPLAIN output into ChatGPT and hope for the best.

At Readyset, we’ve spent years building the most advanced query caching infrastructure in the world. We’ve seen firsthand how the right caching layer can transform database performance without code changes. But we’ve also learned something important: caching alone isn’t enough. The best scaling strategy starts before queries hit your database.

Three Pillars of Effortless Database Scaling

Readyset's mission is to make database scaling the easiest thing your team does, not the hardest. To deliver on that promise, we've built a platform with three complementary pillars:

Readyset CachingQueryPilotrdst (NEW)
Server-side
Wire-compatible caching layer that sits between your app and database. Deep and shallow caching modes.
Proxy-side
Fully managed proxy that automatically identifies and caches your most expensive queries. Zero tuning required.
Client-side
CLI toolkit that helps developers and DBAs write better queries, diagnose issues, and optimize before deployment.

Together, these three products form a complete database scaling platform: rdst catches problems at development time, QueryPilot automates caching decisions in production, and Readyset Caching delivers the raw performance. Each is powerful on its own. Together, they're transformative.

Together, these three products form a complete database scaling platform: rdst catches problems at development time, QueryPilot automates caching decisions in production, and Readyset Caching delivers the raw performance. Each is powerful on its own. Together, they’re transformative.

Introducing rdst: Your SQL Performance Co-Pilot

rdst (pronounced “readyset”) is a production-native, CLI-first SQL performance toolkit that connects directly to your Postgres or MySQL databases and uses AI-powered analysis to help you understand, debug, and fix query performance issues.

Think of it as the database equivalent of the tools you already trust like htop, kubectl, psql, but with an LLM reasoning layer that turns cryptic EXPLAIN plans into plain-English explanations and actionable recommendations.

rdst was born out of repeated customer requests. Teams kept asking us the same question: “Are my queries written correctly? Should I be worried about them?” They didn’t want another dashboard. They wanted a safe, simple way to point a tool at their database and get expert-level feedback. rdst is our answer.

Why CLI-First?

This is a deliberate choice. Production environments are CLI-native. SSH sessions, jump hosts, containers, CI pipelines — that’s where the real debugging happens. IDEs are often blocked in secure environments. A CLI tool fits naturally into the workflows that matter most: incident response, code review, pre-deployment checks, and daily performance hygiene.

rdst is designed to feel like a tool you’ve always had, not a product you need to learn. Install it with a single command, point it at your database, and start getting answers.

uvx rdst help "how do I find slow queries?"

What rdst Does

Find Your Worst Queries Instantly

rdst top connects to pg_stat_statements, performance_schema, slow query logs, or real-time activity monitoring and surfaces your slowest, most frequent, and most resource-intensive queries. Sort by frequency, total time, average latency, or database load. Think of it as htop for your SQL workload.

Understand Why Queries Are Slow

rdst analyze runs EXPLAIN ANALYZE against your database and uses an AI reasoning layer to interpret the execution plan in plain English. It identifies the real bottleneck — missing indexes, sequential scans on large tables, inefficient joins — and suggests concrete fixes: query rewrites, index recommendations, or caching with Readyset.

This isn’t a generic chatbot pasting blog advice. Every recommendation is grounded in your actual execution plan, schema, and runtime statistics. When rdst suggests an index, it tells you why, what the plan will look like after, and what the trade-offs are.

Manage Database Fleets at Scale

rdst fleet lets you register, group, and audit multiple database targets simultaneously. Auto-discover RDS instances, run fleet-wide health audits, save baseline snapshots, and track performance regressions across environments. For organizations managing dozens or hundreds of databases, this turns a manual, error-prone process into a systematic one.

Scan Your Codebase for Query Problems Before They Ship

rdst scan crawls your application code, extracts ORM queries from SQLAlchemy, Django, Prisma, and Drizzle, converts them to SQL, and scores each one for performance risk. Run it in CI to block dangerous queries before they reach production. Run it with --diff HEAD to check only what changed in your latest commit.

This is where rdst bridges the gap between application teams and platform teams. Developers catch performance issues during development — not after deployment, when they become 2 AM incidents.

A Full Web Interface: rdst web

rdst web launches a local FastAPI server with an embedded React frontend, bringing the full power of rdst to a browser-based experience. Run rdst web and open your browser to get real-time, streaming query analysis with rich visualizations — powered by Server-Sent Events (SSE) for live progress updates as rdst works through each stage of analysis.

The web interface exposes every core workflow: analyze queries with streaming AI explanations, ask natural-language questions with interactive clarification flows, monitor slow queries in real time, browse your schema and semantic layer, manage your query registry, and configure database targets. For teams that prefer a visual interface or want to share analysis results across a team, rdst web makes the same production-grounded analysis accessible without requiring everyone to be comfortable in a terminal.

It runs entirely locally — no data leaves your machine. Start it, point your team at the URL, and let them explore query performance together.

Ask Your Database Questions in Plain English

rdst ask (beta) is a natural-language-to-SQL engine grounded in your actual schema. Ask a question like “Show me the top 10 customers by order volume this quarter” and rdst generates, validates, and executes the SQL, with guardrails that ensure read-only safety and column-level accuracy.

The semantic layer (rdst schema) enriches this with business context: what your enum values mean, how tables relate to each other, what each column represents in business terms. The result is text-to-SQL you can actually trust for real work.

Deploy Safe Data Agents

rdst agent (beta) creates named database access interfaces with configurable safety policies (guards) for PII masking, query restrictions, and cost limits. Deploy them as interactive CLI sessions, HTTP APIs, MCP servers, or Slack bots. Give your team safe, governed access to data without giving them raw database credentials.

Battle-Tested, Not Just Built

rdst has been in active development since mid-2025 and has been beta tested with several customers against real production databases, Postgres and MySQL workloads spanning fintech, e-commerce, and SaaS platforms. The features you see today have been shaped by real-world feedback from teams debugging real performance problems.

We are adding capabilities at breakneck speed. rdst is largely LLM-coded, we use Claude Code and other AI development tools extensively to ship features fast. In the last several months, rdst has grown from a handful of commands to a comprehensive platform with 18+ subcommands, fleet management, data agents, a web UI, Slack integration, and CI/CD tooling.

But speed without rigor is reckless, and we know it. Every feature is designed to be production-worthy. LLM feedback is grounded in actual telemetry, execution plans, runtime statistics, and schema definitions, not speculation. Outputs are structured, validated, and cross-checked against deterministic data. When rdst makes a recommendation, you can trace it back to observed behavior in your database. And critically, the same input produces the same analysis every time: we run LLM calls at temperature 0.0 for deterministic, repeatable output.

Innovative Testing for an AI-Powered Tool

Building a trustworthy AI-powered database tool requires testing approaches that go beyond traditional unit and integration tests. We’ve developed several novel strategies to ensure that rdst’s LLM-powered features remain reliable as the tool evolves:

  • Prompt-as-Code Testing. We treat prompts as testable code artifacts. Automated tests inspect the actual prompt source to verify that forbidden guidance is absent (e.g., no WHERE-clause reordering suggestions), required reasoning patterns are present, and concepts are properly connected. This catches prompt drift without running expensive LLM evaluations on every commit.
  • Confidence-Based Refusal Testing. End-to-end tests validate that rdst refuses to answer when it should, and answers correctly when it can. When a question doesn’t match available schema columns, the system produces a low confidence score and declines rather than hallucinating. When columns match, it executes. This is tested against live database interactions.
  • Token Budget Assertions. Every prompt that goes to the LLM is tested to stay within token budgets. This prevents context-window overflows, controls cost, and ensures consistent latency, especially important for fleet audits where prompts aggregate data from multiple databases.
  • Event Stream Validation. The async streaming architecture (used across analyze, ask, top, and the web API) is tested to ensure proper event ordering, serialization, and error recovery. Partial results are preserved when failures occur mid-stream.
  • Full-Pipeline E2E Harness. End-to-end tests run actual rdst CLI commands via a tmux-based harness, validating the entire pipeline from CLI input through LLM reasoning to terminal output, the same path a user experiences.

The result is a tool that moves fast without breaking trust. We ship features in days, but the analysis you get today will be consistent, grounded, and dependable tomorrow.

The Readyset Feedback Loop

rdst isn’t just a standalone tool. It’s the front door to the entire Readyset platform.

When rdst analyzes a query and finds a frequently-run, read-heavy pattern that’s hammering your database, it doesn’t just say “this is slow.” It evaluates whether the query is a good candidate for Readyset caching and, if so, generates the exact command to deploy it:

rdst cache add 'SELECT ...'

This closes the loop from diagnosis to action. Developers discover the problem with rdst, understand it with AI-powered analysis, and fix it by deploying a cache through Readyset, all without leaving the terminal.

For teams already using QueryPilot, rdst provides the visibility layer: understanding which queries are being cached, why, and what additional optimizations are available. For teams evaluating Readyset, rdst is the zero-friction on-ramp that demonstrates measurable value before you commit to anything.

Production-Native Reads real query stats, execution plans, and telemetry from live systems. No toy models. No synthetic advice.
Trust Before Cleverness LLMs are a reasoning layer, not an oracle. Outputs are structured, validated, and cross-checked against deterministic data. If rdst suggests something, you can trace it back to observed behavior.
Safe by Default Designed for read-only operation. Deployable with minimal database privileges. No customer data leaves your network. All state is stored locally in ~/.rdst.
CLI-First, Not CLI-Only The terminal is the primary interface, but rdst also exposes an MCP server for integration with AI coding tools like Claude Code, plus HTTP APIs and Slack bots for broader team access.
Actionable, Not Just Explanatory Understanding a slow query is useful. Fixing it is better. Every analysis ends with a concrete next step.

Who rdst Is For

Developers

You get fast, concrete feedback on the SQL your application generates. rdst explains execution plans in plain language, highlights the real bottleneck, and shows you exactly which change will help, without requiring deep database internals knowledge. Plug it into your CI pipeline and catch performance regressions before they merge.

DBAs and Database Reliability Engineers

rdst is a triage and analysis tool built for how you actually work. Rank slow queries, validate indexing strategies, catch plan regressions, audit entire fleets, and maintain a persistent query registry with semantic context that accumulates over time. The more you use it, the more context it retains.

SREs and Infrastructure Teams

When latency spikes or CPU climbs, rdst answers “which queries are responsible, and why” without requiring you to hop across multiple monitoring systems. It fits naturally into incident response and post-mortems, and its fleet management capabilities scale to multi-database environments.

Teams Evaluating Caching

rdst doesn’t treat caching as magic. It identifies which queries are genuine cache candidates based on actual workload data and explains why, then connects directly to Readyset workflows so your caching decisions are data-driven, not aspirational.

Get Started in 60 Seconds

rdst requires only Python 3.10+ and an Anthropic API key. If you don't have your own API key, you can request a free API key directly from your terminal with limited tokens to explore rdst. No database credentials are stored; passwords are referenced through environment variables.

# Install and start exploring uv tool install rdst export ANTHROPIC_API_KEY="sk-ant-..." rdst init

Or try it without installing:

uvx rdst help "how do I use rdst?"

For teams that want to try rdst with sample data before connecting to their own databases:

rdst demo setup && rdst demo tour

What’s Next

rdst is available today as a free, BSL-licensed tool. We’re actively developing deeper CI/CD integrations, better fleet management tools, and improved agentic interfaces.

We built rdst because we believe the database scaling problem is fundamentally a query problem, and solving it requires meeting developers and DBAs where they already work: in the terminal, in the codebase, in the CI pipeline. Not in another dashboard.

Readyset Caching handles the infrastructure. QueryPilot automates the caching decisions. And now, rdst gives your team the tools to write better queries from the start. That’s the complete picture of effortless database scaling.

LEARN MORE

Website: readyset.io

Contact: [email protected]

GitHub: github.com/readysettech/readyset

Authors