# Diagnose a production data problem or slow query, read-only

> Diagnose a production data problem or slow query, read-only: 2 companies fully do it, 10 with a limit, 14 carry the tag. Every listing in Databases & files with the reason and a source.

- Canonical: https://www.anchorterminal.com/niches/data.diagnose-prod/
- Markdown: https://www.anchorterminal.com/niches/data.diagnose-prod/index.md (~1,450 tokens)
- Slim: https://www.anchorterminal.com/niches/data.diagnose-prod/index.min.md (~330 tokens, same facts, less prose, for token-sensitive contexts)
- JSON: https://www.anchorterminal.com/niches/data.diagnose-prod/index.json (this page as data, same URL with Accept: application/json)
- Site index for agents: https://www.anchorterminal.com/llms.txt (the key docs and every listing in one file, at most 16 MB, about 4 million tokens: https://www.anchorterminal.com/llms-full.txt)
- API: https://www.anchorterminal.com/api/v1/index.json
- MCP: https://www.anchorterminal.com/mcp (the whole catalogue as tools, no key)
- DNS: dig +short TXT <slug>.grade.anchorterminal.com (the grade as a DNS TXT record, for a sandbox with no HTTP where names still resolve; also top., best.<category>. and <a>.vs.<b>. under the zone, and the same under grade.letme.dev)
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)
- Updated: 2026-11-15

Two or three companies' docs show a full fit.

| Companies, full fit | With a limit | Carry the tag | Share of the category's work | First-hand accounts |
| --- | --- | --- | --- | --- |
| 2 | 10 | 14 | 12 | 8 |

## What counts as done

The agent returns the rows, plan or health finding that explains the problem, each finding naming what was examined, with no write, DDL or long-held lock on production.

Measured, for our own tests: every query ends within the statement timeout and returns no more than the configured row cap.

How agents ask for it: why is this query slow; find the rows that broke the import; check database health; is there a missing index

## Does the job

The docs show it meets the test above, and nothing we read says otherwise.

- **DBHub (Bytebase)**: Opt-in explain_sql never executes and rejects ANALYZE; query_timeout maps to statement_timeout; SSH tunnels per source; per-tool readonly and max_rows. An account runs production support across nine sources this way.
- **MongoDB MCP Server (MongoDB, Inc.)**: explain returns winning-plan statistics, indexCheck rejects collection scans, readOnly removes write tools, and document and byte caps bound each result.

## Does the job, with a limit

It does the job, but something in the docs or a user's account will get in an agent's way. The limit is named in each row.

- **Mirage (AgentVFS) (Strukto.AI)**: A read-only mount with row and byte caps and a 30-second timeout can find bad rows, but there is no plan, explain or health check.
- **ClickHouse MCP Server (ClickHouse, Inc.)**: Read-only by default with a query timeout and EXPLAIN ESTIMATE or DESCRIBE, which do not run the body (scalar subqueries excepted), but there is no row cap, so the measured row-cap bar cannot hold.
- **MCP Toolbox for Databases (Google LLC)**: Read-only session locks plus Postgres tools for active queries, long-running transactions and a database overview, but no EXPLAIN-without-execution tool was found for Postgres and execute_sql returns uncapped rows.
- **Neon MCP Server (Neon, LLC (subsidiary of Databricks, Inc.))**: inspect_database runs 15 read-only checks, plus explain_sql_statement and list_slow_queries, but Neon's docs say never to connect MCP agents to production databases.
- **ObsessionDB (Kellerkind UG (haftungsbeschränkt))**: Monitoring tools list query patterns, executions, error signatures and table sizes; but with no read-only mode or scope documented for run_sql, the no-write guarantee rests on the agent.
- **PlanetScale MCP Server (PlanetScale, Inc.)**: Insights, query error patterns and executions, branch metrics and Postgres logs, with reads on a replica under a read-only role and a 50-second limit; no row cap.
- **Postgres MCP Pro (Crystal Corp.)**: explain_query with hypothetical indexes, get_top_queries, analyze_query_indexes and analyze_db_health fit the job, but #211 shows health reporting no bloated indexes when none was examined, and #178 a restricted-mode file-read bypass, both open.
- **Redis MCP (Redis Ltd.)**: A server-management tool returns database info and an ACL user can be read-only, but no slow-log, explain or row cap is documented, and runtime switching of logical databases is missing (#90).
- **Snowflake-managed MCP server (Snowflake Inc.)**: SQL runs under the user's role, so a read role keeps writes out, but no explain, health or row-cap tool is offered; annotations are hints Snowflake does not enforce.
- **Supabase API + MCP (Supabase Pte. Ltd.)**: get_advisors and debugging logs with read-only mode, but no EXPLAIN-only tool or row cap, and accounts keep it off production.

- not this job: CoinMarketCap x402 API (CoinMarketCap): No database connection, query plan or health tool; it serves vendor data only.
- not this job: Filesystem (MCP reference server) (Model Context Protocol, a Series of LF Projects, LLC): No database access.
- not this job: Memory (MCP reference server) (Model Context Protocol, a Series of LF Projects, LLC): No database access.
- not this job: Nansen x402 API (Nansen): No database connection, query plan or health tool; it serves vendor data only.
- not this job: ReqRes MCP server (ReqRes): No plans, health checks or access to a production database; a request log covers its own project only.

## What stops agents finishing

- every command needs human review because no read-only boundary is trusted
- health check reports clean when it examined nothing
- production reachable only from inside a private network

## Around it

Before: observability.read-error. After: code.ticket-to-pr, data.safe-migration.

## Where this comes from

Weight 12 of 100 in Databases & files: 8 of 52 accounts (DBHub production-support comments, Ask HN on DB access, Postgres MCP Pro health check, QueryBear thread)

As data: https://www.anchorterminal.com/api/v1/use-cases/data.diagnose-prod.json, or the MCP tool get_use_case with id data.diagnose-prod. Draft, read 2026-11-15 from public docs and first-hand accounts, not yet reviewed by a person.

---

Query this catalogue directly over MCP: https://www.anchorterminal.com/mcp (Streamable HTTP, no key). How: https://www.anchorterminal.com/agents/#mcp
