Show HN: DeepSQL – 一个可自托管的 Postgres 和 MySQL AI 数据库管理员代理
Show HN: DeepSQL – A self-hostable DBA agent for Postgres and MySQL

原始链接: https://deepsql.ai/

DeepSQL 是一款人工智能数据库管理员与数据工程师,旨在优化数据库性能并降低最高 38% 的成本。它充当数据库的智能“大脑”,能够监控工作负载、分析慢查询并生成商业智能(BI)仪表板。 主要功能包括: * **自托管安全:** 完全在您的私有云(VPC)内运行,确保数据和凭据绝不会离开您的基础设施。 * **快速部署:** 只需一条简单的命令,15 分钟即可完成安装。 * **智能上下文:** 与您的数据库架构和业务逻辑(如特定的收入定义)集成,提供高度准确且可操作的洞察。 * **灵活接口:** 用户可以通过 Web UI、命令行界面(CLI)与代理交互,或通过 MCP 连接到 Cursor 或 Claude 等工具。 DeepSQL 自动化了繁重的数据库管理工作,使团队能够通过自然语言诊断性能瓶颈并获取复杂的业务洞察。无论是优化索引还是追踪数据摄入量,DeepSQL 都能让您的数据库实现自动驾驶,在无需额外开销的情况下提供专业级的可观测性与维护能力。

DeepSQL 是一款可自托管的 AI DBA 智能体,旨在为 PostgreSQL 和 MySQL 提供自动化数据库管理。该工具由前 Oracle 查询引擎工程师开发,最初是 Stayflexi 内部用于优化数据库性能、降低基础设施成本及管理模式膨胀(schema bloat)的解决方案。 该智能体充当“资深 DBA”的角色,通过 20 个后台作业持续监控数据库,以主动解决性能瓶颈。主要功能包括: * **优化:** 自动化处理慢查询并防止模式膨胀。 * **BI 与访问:** 生成仪表板以替代 Tableau 等第三方工具,并对个人身份信息(PII)进行脱敏,以实现安全的数据访问。 * **集成:** 提供一个“大脑”,通过 MCP 与命令行界面、Slack、Web UI 以及集成开发环境(如 Cursor/Claude)进行交互。 * **自托管:** 使用内置存储层(Postgres 和 PGVector)来维护上下文。 DeepSQL 的目标并非取代人类 DBA,而是通过自动化日常维护并提供专家级的数据库健康洞察来赋能工程师。该工具可通过一行安装脚本进行部署,目前已开放以供社区反馈和集成。
相关文章

原文
The brain for your database

Your 24/7 DBA and Data Engineer

DeepSQL monitors workloads, optimizes slow queries, and ships BI dashboards to cut database costs by 38%.

One-line install · Self-host in 15 minutes

Works with
ClaudeCodexCursor
deepsql · agent
what are the top 5 customers having large velocity of data in last 7 days?
7 steps · brain · schema · workload · executed
  1. Loaded brain context — customers · sales_report_aggregation · velocity metric
  2. Resolved schema — public.sales_report_aggregation · public.accounts
  3. Checked workload patterns — similar aggregation seen 42× in last 24h
  4. Drafted query — GROUP BY account_id · SUM(rows_ingested)
  5. Validated plan — index scan on idx_sra_created_at · 38ms est.
  6. Confidence: high — matches 3 governed metrics in brain
  7. Executed on read replica — returned 5 rows in 41ms

Top 5 customers by rows ingested into sales_report_aggregation over the last 7 days:

CustomerRows / dayΔ vs prior wk
Aurora Hospitality (30469)4.82M+18%
Nordic Stays Group (28104)3.91M+12%
Coastline Resorts (31287)3.44M+9%
Meridian Hotels (29553)2.87M+6%
Lumen Suites (30988)2.31M+21%

Combined 17.35M rows/day — 62% of total ingestion volume.

How it works

From zero to a working AI DBA in 15 minutes

Self-hosted end-to-end. Your data, your credentials, your VPC.

1
Install
One line

Run this on any Linux box, EC2, or container in your VPC. Installs the DeepSQL agent, CLI, and MCP server on the machine.

2
Setup
Point it at your data

Add database connections, teach it your company's knowledge, and feed it your slow query logs. DeepSQL indexes your schema and starts learning your workload immediately.

Database connections

Postgres or MySQL — read replica, VPC-peered. Read-only credentials, no data leaves your infra.

host: aws-rds-replica.internal
role: deepsql_ro
ssl: require
Company knowledge

Teach DeepSQL your business rules in plain English — MRR, active-hotel, currency conventions.

// MRR = SUM(subscription.mrr)
// WHERE status = 'active'
// Active hotel = check-ins ≥ 1 / 30d
Slow query logs

Point at pg_stat_statements or MySQL slow log. DeepSQL clusters, ranks, and starts recommending.

source: pg_stat_statements
window: 30d rolling
grouped: 1,284 → 96 fingerprints
3
Go live
Start shipping fixes

Chat with the built-in DeepSQL agent in your browser, or connect Claude, Codex, and Cursor to your DeepSQL instance over MCP or CLI.

Remote MCP / CLI client
Works with
ClaudeCodexCursor

Put your database on autopilot.

One-line install. Self-host in 15 minutes. Role-based access, query policies, and audit logs built in.

The DeepSQL Blog

Field notes from inside the database

Deep dives on cutting Aurora costs, replacing Tableau, and why your observability bill is a lie. Written for senior DBAs and data engineers.

Read the blog
联系我们 contact @ memedata.com