QUERY PERFORMANCE · ZERO ROWS READ ← All Developer Tools
SQL QueryDoctor: Zero-Row Query, ESR Index & EXPLAIN Plan Analyzer
Diagnose slow PostgreSQL, MySQL, and SQLite queries using schema structure and optional EXPLAIN plans — zero database connections, zero customer rows read, and lock-safe CREATE INDEX CONCURRENTLY recommendations.
Open QueryDoctor in Schema IDE → Run in CLI Sandbox → Launch Full Console
The Engineering Problem
Developers paste slow SQL queries into production without checking whether an existing index already covers the predicate, whether WHERE LOWER(email) disables B-Tree lookup, or whether CREATE INDEX without CONCURRENTLY will lock writes.
SELECT * FROM orders WHERE customer_id = 105 ORDER BY created_at DESC;
[STRUCTURAL_INDEX_HYPOTHESIS] ESR composite index candidate on orders(customer_id, created_at DESC) CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_orders_customer_id_created_at ON orders (customer_id, created_at DESC); [STATIC_QUERY_PATTERN] Avoid SELECT * in application queries.
Run 100% Offline in Your Terminal or CI
pip install solunex-ssdo ssdo query-doctor --query "SELECT * FROM orders WHERE customer_id = 105 ORDER BY created_at DESC;" --schema ./schema.sql --explain ./plan.txt
What SSDO Checks & Generates
- Strictly separates MEASURED_PLAN_EVIDENCE (from pasted EXPLAIN JSON/text) from STRUCTURAL_INDEX_HYPOTHESIS.
- Computes Equality-Sort-Range (ESR) composite B-Tree index candidates and skips any index already covered by your schema DDL.
- Detects non-sargable WHERE functions (LOWER(col), DATE(col)), leading-wildcard LIKE '%...', SELECT *, and deep OFFSET pagination.
- Emits lock-safe PostgreSQL CREATE INDEX CONCURRENTLY IF NOT EXISTS SQL — never executes SELECT or auto-creates indexes.
Frequently Asked Questions
Does SSDO QueryDoctor connect to my database or run SELECT on my tables?
Never. QueryDoctor operates 100% offline on your SQL query text, schema DDL catalog, and optional pasted EXPLAIN output. Zero rows are ever read.
Will QueryDoctor automatically create or drop indexes?
No. Every index suggestion is labeled as a STRUCTURAL_INDEX_HYPOTHESIS with copyable lock-safe DDL for human review and EXPLAIN verification.
More Zero-Row Developer Tools
- PostgreSQL Zero-Downtime Migration & Rollback SQL Generator
- SQL & SQLAlchemy to FastAPI + Pydantic v2 Code Generator
- Foreign-Key ON DELETE CASCADE Blast Radius & Insert Order Simulator
- Audit Existing FastAPI, Express & Next.js Routes Against Your SQL Schema
- SQL Schema to OpenAPI 3.1 & Next.js / Zod Route Generator
- SQLAlchemy, Prisma & Drizzle Schema Visualizer & ERD Explorer