Here is a slow PostgreSQL query and its EXPLAIN ANALYZE output. Walk the plan node by node, identify the dominant cost, and propose fixes in order of least invasive: query rewrite, then index, then schema change. Estimate the impact of each. Never suggest an index without naming its write cost. [QUERY + PLAN]
▸ ready to runHere is a slow PostgreSQL query and its EXPLAIN ANALYZE output. Walk the plan node by node, identify the dominant cost, and propose fixes in order of least invasive: query rewrite, then index, then schema change. Estimate the impact of each. Never suggest an index without naming its write cost. [QUERY + PLAN]
Slow Query Explainer and Fixer
A query-tuning prompt ordered by invasiveness so you try rewrites before adding indexes. Requiring the write-cost caveat on every index suggestion filters out advice that would just move the pain to inserts.
