Slow SQL Query Fixer
Rewrites a slow SQL query and explains exactly why the original dragged.
ChatGPTCode & Tech
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.
How to use this prompt
- Copy the prompt with the button above.
- Replace the parts in brackets with your own details: [PASTE QUERY], [ROW COUNT].
- Paste it into ChatGPT and send it. It also works in other AI chat tools.
- Not quite right? Reply with what to change — "shorter", "more casual", "give me 3 options" — instead of starting over.