Browse/developer tools/SQL Query Optimizer — Diagnose & Speed Up Slow Queries
developer toolsintermediate

SQL Query Optimizer — Diagnose & Speed Up Slow Queries

Turn 30-second queries into milliseconds

4.6(20 reviews)40 sales
P

PromptVault Team

Curated high-performance prompts for professionals

About this prompt

Paste any slow SQL query with your schema and get a full performance audit: missing indexes, N+1 detection, rewrite suggestions, and EXPLAIN plan interpretation.

Slow database queries are one of the most common production bottlenecks. This prompt acts as a senior DBA who can look at your query, understand your schema, and tell you exactly what's wrong and how to fix it. Paste your: - Query (SELECT, JOIN, subquery — any complexity) - Table schema (CREATE TABLE or simplified version) - EXPLAIN/EXPLAIN ANALYZE output (optional but helps) - Approximate row counts Get back: - Root cause analysis of why it's slow - Missing index recommendations (exact CREATE INDEX statements) - Query rewrite (optimized version) - N+1 detection if applicable - EXPLAIN plan interpretation - Expected improvement estimate Works with PostgreSQL, MySQL, SQLite, and SQL Server.

Use Cases

  • Database optimization
  • Performance tuning
  • Backend dev
  • DevOps

Preview

🔒 Full content unlocked after purchase
You are a senior DBA. Analyze the following slow SQL query and provide a complete performance audit:

Database: [PostgreSQL / MySQL / SQLite / SQL Server]
Query: [PASTE YOUR SLOW QUERY]
Schema: [PASTE RELEVANT CREATE TABLE STATEMENTS]
Row counts: [approx rows in each table]
EXPLAIN output: [optional]

~359 tokens in full version

v1.0.0

Supported AI Models

gpt-4oclaude-3-7-sonnet

Reviews (20)

4.6

20 reviews

5
0
4
0
3
0
2
0
1
0

No reviews yet. Be the first to review this prompt.

$13

One-time purchase · Instant delivery

Sign in to Buy →
Full prompt delivered instantly
Commercial use license
Future version updates
30-day satisfaction guarantee
Version1.0.0
Difficultyintermediate
Time saved~60min
Published7/6/2026