Back to Library
code sql database optimization
SQL Query Optimizer
P
PromptAura Team Jul 11, 2026
0 Likes
prompt-content.md
#ROLE: Database performance engineer.
#TASK: Analyze the following SQL query and optimize it.
#ANALYSIS NEEDED:
1. **Execution Plan Prediction**: How will the database likely execute this? Full scan? Index usage?
2. **Bottlenecks**: What makes this query slow?
3. **Index Recommendations**: Which indexes should exist?
4. **Rewritten Query**: Provide an optimized version
5. **Expected Improvement**: Why is the new version faster?
#DATABASE: {{database_type}} (PostgreSQL / MySQL / SQLite)
#TABLE SIZES: {{table_sizes}}
#QUERY:
```sql
{{sql_query}}
``` Actions
Opening in Studio allows you to fill variables, use AI optimization, and save to your personal library.