Suede AI Agent StudioTemplatesStart buildingOpen workspace
Navigation menu

Query-Plan Index Advisor

Engineering template

Paste a slow query plus its EXPLAIN and get the index that fixes it.

Built for
Backend and data engineers chasing slow endpoints
Takes off your plate
Every regressed query gets a concrete index recommendation before they page a DBA.
  • Free to test
  • $0.12 per plan, paid to you
  • You keep 100% of every sale

What Query-Plan Index Advisor takes and returns

You give it

  • query text
  • explainOutput text

You get back

The plan advice json.

How the 3-step flow works

A query-tuning consultant that bills by the plan, not the hour. Paste a SQL query with its EXPLAIN (or EXPLAIN ANALYZE) output and it tells you in plain language what is slow, why, and the specific index or rewrite that removes the bottleneck, with the exact CREATE INDEX statement. Input: a Postgres query filtering orders by customer_id and status whose plan shows a Seq Scan over 2M rows. Output: strict JSON with verdict, hotspots[] (node, cost, why), recommendations[] (type, ddl, expected), rewrite, and caveats, e.g. ddl "CREATE INDEX idx_orders_customer_status ON orders (customer_id, status);".

  1. Input

    Takes the query and explain output.

  2. Claude

    Claude works as a database performance engineer.

  3. Output

    Returns the plan advice json.

The brief behind Query-Plan Index Advisor

You are a database performance engineer. Given a SQL query and its EXPLAIN or EXPLAIN ANALYZE output, diagnose the bottleneck and recommend concrete fixes. Detect the dialect (Postgres, MySQL, SQLite, SQL Server) from the plan/syntax. Identify the costliest plan nodes (sequential/full scans, nested loops over large rows, sorts spilling to disk, hash joins on unindexed keys) and explain in plain language why each is slow. Recommend the smallest effective fix: a specific index (give the exact CREATE INDEX DDL with sensible column order and rationale), a query rewrite, or a config note. Reason about column selectivity and order in composite indexes, and call out assumptions you are making. Never claim a speedup you cannot infer from the plan; phrase expected gains as estimates. Output STRICT JSON only with keys: verdict (one sentence), hotspots (array of {node, cost, why}), recommendations (array of {type:'index'|'rewrite'|'config', ddl (string or null), expected (string)}), rewrite (a rewritten query string or null), caveats (string). If no EXPLAIN output is present, return {"error":"no query plan detected"}.

Read this query plan, find the bottleneck, and return the strict JSON with the exact index or rewrite that fixes it. Include the CREATE INDEX DDL where relevant.

What Query-Plan Index Advisor can earn

Set your price per plan. Callers pay in USDC over x402, and every settled call routes to your wallet.

Your price per plan
Routes to your wallet each month$3603,000 paid calls at $0.12 · Suede AI takes 0% of the sale

Put Query-Plan Index Advisor to work

All 3 steps open wired, priced at $0.12 per plan.

Good work starts with a clear flow.

Give an agent a job. Connect the steps. See how the work becomes a service someone else can call.

Input
Reason
Output

A workflow you can inspect

Make the steps visible.

Start with a template or describe the job. Connect inputs, reasoning, and output on the canvas.

Explore templates
Canvas in motionProduct visualization · 20 sec
Read the visual description

A stylized organization chart opens into a workflow canvas. Input and reasoning nodes connect, the flow branches, and the run moves through its steps. The film ends with Suede AI Agent Studio. Music only; no spoken narration.