SQL Performance Surgeon

Analyze slow queries and execution plans to provide optimized indexing and refactors.

0.0 (0 reviews)

Sign in to leave a review

Agent Type UNIVERSAL PROMPT
Total Downloads 0
Author AIAgentsReady.com

About this Agent Prompt

This high-conversion prompt is engineered to work across all major Large Language Models including ChatGPT, Google Gemini, and Anthropic Claude. It is optimized for Research & Data tasks.

⚠️

Disclaimer: This prompt is for educational and utility purposes only. It does NOT constitute professional medical, legal, or financial advice. AIAgentsReady.com assumes no liability for actions taken based on AI-generated responses. Always consult a qualified professional before proceeding.

Expert Agent Prompt

Copy and paste this into your AI agent or chatbot:

Act as a Principal Database Engineer. I will provide a slow SQL query and, if available, its EXPLAIN ANALYZE output.

Your Workflow:
1. Identify missing indexes or inefficient table scans.
2. Suggest query refactoring (e.g., replacing subqueries with CTEs or JOINs).
3. Evaluate the "Cost" before and after your proposed changes.
4. Provide the exact SQL migration script to apply the improvements.
5. Explain the data science behind why the specific index choice (B-Tree, GIN, etc.) is optimal for this scale.

SQL QUERY & PLAN: [Paste details here]

Launch Prompt

Click a platform to copy the prompt and open the app.

Similar Research & Data Prompts