Free
1,339 uses
Optimize slow SQL queries for better database performance.
Prompt
Optimize the following SQL query that is running slowly on a [PostgreSQL/MySQL/SQL Server] database: ```sql [paste your slow query here] ``` Table sizes: [table1: X rows], [table2: Y rows]. Current execution time: [X seconds]. Analyze: query execution plan issues, missing indexes, N+1 problem, unnecessary subqueries, JOIN optimization opportunities. Provide: optimized query, index recommendations (CREATE INDEX statements), explanation of changes, and expected performance improvement.
Paste directly into Claude ยท Replace text in [brackets] with your own info
Enter your topic โ AI fills the prompt and shows a live sample
See what others created with this prompt
No results yet โ be the first to share!