SQL query generator from a plain-English request
Converts a natural-language data requirement plus a table schema into a syntactically correct SQL query for a named database, with its assumptions stated up front.
Interpret supplied plan evidence and prioritize query or index experiments without inventing costs or speedups.
No public result for version 1 yet
Version 1 · 3 variables · 3 required
Fill in the values below — the customized prompt updates as you type. marks a required value.
Engine/version, workload and measured symptoms. Default: PostgreSQL 16; weekly reporting query; measured around 2 seconds on a staging copy.
Query, relevant keys, indexes and table sizes. Default: SELECT customer_id, count(*) FROM orders WHERE created_at >= DATE '2026-08-01' GROUP BY customer_id; orders(id bigint primary key, customer_id bigint, created_at timestamptz);
Actual EXPLAIN output and observed timings, or explicit missing evidence. Default: No execution plan captured yet. The table contains approximately 2 million rows.
Investigate this slow query.
Database and workload: PostgreSQL 16; weekly reporting query; measured around 2 seconds on a staging copy.
Query and schema: SELECT customer_id, count(*) FROM orders WHERE created_at >= DATE '2026-08-01' GROUP BY customer_id;
orders(id bigint primary key, customer_id bigint, created_at timestamptz);
Execution plan and measurements: No execution plan captured yet. The table contains approximately 2 million rows.
Restate the required result and current measured baseline. Walk through the supplied plan, distinguishing estimated rows from actual rows and identifying costly operations, loops, sorts, or cardinality surprises supported by the evidence.
Propose at most three experiments. For each, state the hypothesis, a minimal query or index change, correctness risks, write/storage tradeoffs, and the before/after measurement needed. Preserve filtering, null, duplicate, and ordering semantics.
If no plan is supplied, request the minimum useful plan information rather than simulating costs. Note that execution-based plan commands run the query and should be used only in a suitable environment. Do not invent speedups or recommend dropping indexes from one query alone.No public examples yet for version 1
Converts a natural-language data requirement plus a table schema into a syntactically correct SQL query for a named database, with its assumptions stated up front.
No public results yet
Check join cardinality and aggregation grain to explain duplicate rows or double-counted measures before changing a reporting query.
No public results yet
Break a dependency replacement into reviewable stages with compatibility checks, exit criteria and realistic rollback limits.
No public results yet
Define realistic traffic, workload data, measurements and stopping rules for an authorized performance test.
No public results yet
Find source-visible labeling, semantics and keyboard risks, while separating code findings from checks that require a browser.
No public results yet
Map feature assets, trust boundaries and data flows to concrete threats, existing controls and targeted verification tasks.
Oldest first · one level of replies
Sign in to join the discussion. Share what you learned or made with this prompt.
No comments yet
Be the first to share how this prompt worked for you.