prompt

SQL Performance Optimizer

Analyze slow SQL queries to identify bottlenecks (missing indexes, poor joins, large scans) and provide optimization recommendations with expected performance gains.

Updated June 2026
The prompt
This query runs in {{current_duration}} but we need it under {{target_duration}}: {{query_text}}. Analyze for: 1) query execution plan issues, 2) missing or inefficient indexes, 3) table scan opportunities, 4) join optimization possibilities, 5) data type mismatches. Provide rewritten query, index creation statements, and estimated execution time improvement with percentage gains.
Did it work? Rate this prompt

Variables

Current query execution time
Target execution time
SQL query code

Details

Author

AI Khazna

License

Security

Type

prompt

Related assets

More curated picks in Data & Analytics.

Audit before you install

Run any source through our checks - AI visibility, security, performance, and stack detection.

More in Data & Analytics