Slow SQL Query Fixer

Rewrites a slow SQL query and explains exactly why the original dragged.

40 words · free to use
This SQL query is running slowly: [PASTE QUERY]. The table(s) involved have roughly [ROW COUNT] rows. Rewrite it to be faster, explain specifically why the original was slow (missing index, unnecessary subquery, etc.), and suggest any indexes that would help.
SQLdatabaseperformance

How to use this prompt

  1. Copy the prompt with the button above.
  2. Replace the parts in brackets with your own details: [PASTE QUERY], [ROW COUNT].
  3. Paste it into ChatGPT and send it. It also works in other AI chat tools.
  4. Not quite right? Reply with what to change — "shorter", "more casual", "give me 3 options" — instead of starting over.

Related code & tech prompts

See all 183 Code & Tech prompts →

Get 10 new prompts every week

Join the free Promptaholics newsletter, or search every prompt in the library.

We use cookies for analytics and ads. See our Privacy Policy.