prompt

Database Query Performance Analyzer

Break down slow queries and suggest indexing, query rewrites, and schema optimizations with execution plan analysis.

Updated June 2026
The prompt
Optimize this {{database_type}} query that is executing in {{execution_time}}ms. Analyze the execution plan and dataset size:

{{slow_query}}

Table schemas:
{{table_schemas}}

Suggest: (1) index strategy, (2) query rewrite, (3) schema adjustments. Prioritize by {{optimization_goal}}.
Did it work? Rate this prompt

Variables

Database System (PostgreSQL, MySQL, MongoDB)
The slow query
Relevant table definitions
Current execution time in ms
Goal (latency, throughput, resource cost)

Details

Author

AI Khazna

License

Security

Type

prompt

Related assets

More curated picks in Development & Code.

Audit before you install

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

More in Development & Code