prompt
Slow Query Optimization
Speed up a slow database query.
Updated June 2026
The prompt
Help me optimize this slow SQL query: {{query}}. On a {{db}} database. Identify the likely reasons it is slow (missing indexes, full scans, inefficient joins, subqueries, functions on indexed columns, returning too much data), explain how to read what is happening, recommend specific improvements and indexes with the trade-offs, and provide an optimized version. Explain why each change helps, and note the change likely to give the biggest speedup. Keep correctness identical.
Did it work? Rate this prompt
Variables
SQL queryDatabaseDetails
Author
AI Khazna
License
—
Security
—
Type
prompt
Related assets
More curated picks in Data & Analytics.
prompt
Turns a set of findings into a clear narrative with a headline, supporting points, and a call to action.
Data Storytelling Builder
Turns a set of findings into a clear narrative with a headline, supporting points, and a call to action.0+
prompt
Get a structured, step-by-step plan to clean a messy dataset before analysis.
Data Cleaning Plan Generator
Get a structured, step-by-step plan to clean a messy dataset before analysis.0+
prompt
Plans a pivot table to answer a specific question from your data.
Pivot Table Planner
Plans a pivot table to answer a specific question from your data.0+
prompt
Produces a structured checklist to audit a dataset across completeness, accuracy, consistency, and timeliness.
Data Quality Audit Checklist
Produces a structured checklist to audit a dataset across completeness, accuracy, consistency, and timeliness.0+
prompt
Describe what you want in words and get the exact Excel formula, plus a short explanation of how it works.
Excel Formula Builder
Describe what you want in words and get the exact Excel formula, plus a short explanation of how it works.0+
prompt
Define the right KPIs, chart types, and layout for a dashboard that serves a specific goal and audience.
KPI Dashboard Planner
Define the right KPIs, chart types, and layout for a dashboard that serves a specific goal and audience.0+
Audit before you install
Run any source through our checks - AI visibility, security, performance, and stack detection.
Automated Web Security Scan
security
PageSpeed Analyzer
performance
AI Content Quality Test
arabic content
AI Agent / MCP Server Tester
ai testing
Site Stack Detector
migration
AI SEO / AEO / GEO Audit
ai visibility
llms.txt Generator
ai visibility
Readability Score
arabic content
Schema / JSON-LD Builder
ai visibility
AI Cost Calculator
ai testing
Headline Analyzer
arabic content