Engineering4.7 · 452 ratings

SQL Query Optimizer

Optimize this SQL query for performance: ```sql [query] ``` Schema context: [table structures, approximate row counts, existing indexes] …

Role-Based

Prompt

Optimize this SQL query for performance:
```sql
[query]
```
Schema context: [table structures, approximate row counts, existing indexes]

Provide: (1) Explain plan analysis of the original. (2) Identified bottlenecks. (3) Optimized query with comments. (4) Index recommendations with CREATE INDEX statements. (5) Expected performance improvement. (6) Alternative approaches if applicable.

Recommended models

claudegpt-4ogemini

More in Engineering