Show HN: DeepSQL – A self-hostable DBA agent for Postgres and MySQL
Introducing DeepSQL: Your Autonomous, Self-Hosted DBA for Postgres & MySQL
DeepSQL acts as a comprehensive, 24/7 Database Administrator and Data Engineer. By continuously monitoring workloads, refining sluggish queries, and generating BI dashboards, it is designed to reduce your database expenditures by .
🚀 Rapid Deployment
You can transition from zero to a fully operational DBA in just 15 minutes. DeepSQL is designed for end-to-end self-hosting on any Linux instance, EC2, or VPC container.
One-line installation:
curl -fsSL https://install.deepsql.ai/install.sh | bash
🧠 The "Brain" in Action: An Example
DeepSQL doesn't just guess; it follows a rigorous logical chain to ensure accuracy and performance.
User Query: "What are the top 5 customers with the highest data velocity over the last 7 days?"
Internal Processing Log:
- Context: Loaded
customers,sales_report_aggregation, andvelocitymetrics. - Schema: Resolved
public.sales_report_aggregationandpublic.accounts. - Workload: Identified that similar aggregations occurred in the last 24 hours.
- Draft:
GROUP BY account_idSUM(rows_ingested). - Validation: Confirmed
index scanonidx_sra_created_atwith an estimated latency of38ms.
Result (Confidence: High): The query was executed on the read replica in .
| Customer | Rows / Day | vs Prior Week |
|---|---|---|
| Aurora Hospitality (30469) | 4.82M | |
| Nordic Stays Group (28104) | 3.91M | |
| Coastline Resorts (31287) | 3.44M | |
| Meridian Hotels (29553) | 2.87M | |
| Lumen Suites (30988) | 2.31M | |
| Combined Total | 17.35M | 62% of total volume |
🛠️ Setup Guide
Getting your database on autopilot involves three primary phases:
- 1. Installation
Deploy the agent, CLI, and MCP server using the
curlcommand provided above. - 2. Configuration Connect your data and provide the "knowledge" necessary for the agent to understand your business.
- 3. Activation Begin interacting via the Web UI or integrated AI tools.
Configuration Details
Database Connectivity
DeepSQL supports Postgres and MySQL via VPC-peered read replicas.
Example Config:
host: aws-rds-replica.internal
role: deepsql_ro
ssl: require
Company Knowledge Teach the agent your specific business logic using plain English:
// MRR =
SUM(subscription.mrr)wherestatus = 'active'// Active hotel = per 30 days // Use standard currency conventions.
Slow Query Integration Feed the agent your logs to enable optimization:
- Source:
pg_stat_statementsor MySQL slow log. - Window: 30-day rolling window.
- Efficiency: Grouped queries into unique fingerprints.
🔌 Integration & Ecosystem
DeepSQL is flexible in how you interact with it. You can use the built-in browser agent or connect external LLMs via the Model Context Protocol (MCP) or CLI.
Install the Remote MCP/CLI client:
npm install -g @deepsql/mcp@latest
Compatible with:
- Claude
- Codex
- Cursor
📚 Further Reading
Explore the DeepSQL Blog for technical deep dives on:
- Strategies for cutting Aurora costs.
- Why you should
use Tableaureplace Tableau with automated BI. - The truth about why your current observability bill is a lie.
For more information, visit the [official documentation].