What problem does it solve?
Writing correct and performant SQL requires knowing the database schema and understanding execution plans, which is time-consuming when working with unfamiliar SQLite or PostgreSQL databases.
Core Features & Use Cases
- Schema Extraction: Extracts tables, columns, indexes, foreign keys, and sample rows into JSON or a compact text format suitable for LLM prompts.
- Rule-Based Query Optimization: Detects 13 SQL anti-patterns such as SELECT *, leading-wildcard LIKE, NOT IN subqueries, and functions on indexed columns, without needing a database connection.
- EXPLAIN Plan Interpretation: Runs EXPLAIN (or EXPLAIN ANALYZE on PostgreSQL) and flags full table scans, disk sorts, nested loop joins, and row estimate deviations.
- Use Case: Given a SQLite file, extract its schema in compact mode, generate a query from a natural language question, then verify the query uses an index instead of a full table scan before running it in production.
Quick Start
Ask the assistant to extract the schema from your SQLite database file and turn your question into an optimized SQL query with an explained execution plan.