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
Status Verified Hub Blueprint
Author AIAgentsReady.com

Expert Agent Implementation

This high-conversion prompt is engineered to work across all major Large Language Models including ChatGPT 5.4, Google Gemini 3.1 Pro, and Anthropic Claude 4. It is optimized for Research & Data workflows, focusing on precision, tone coherence, and executable logic.

At AIAgentsReady.com, we test every blueprint for robustness. This specific configuration for SQL Performance Surgeon has been verified to meet our community standards for efficiency and effectiveness.

🚀 Best Used With

  • ChatGPT 5.4 (Advanced Reasoning)
  • Gemini 3.1 Ultra (Long Context)
  • Claude 4.0 Sonnet (Technical Tasks)

🎯 Common Use Cases

  • De-fragging and optimizing complex JOIN queries on large datasets.
  • Identifying missing or redundant indexes based on execution plans.
  • Refactoring expensive sub-queries into performant materialized views.
⚠️

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: Principal Database Performance Engineer.
INPUT: {{SQL_QUERY_AND_PLAN}}

TASK:
1. Identify the root cause of high latency from the provided {{SQL_QUERY_AND_PLAN}}.
2. Suggest the exact INDEX (B-Tree, GIN, BRIN) or Query refactor needed for optimization.
3. Evaluate the "Cost" before and after the proposed fix.
4. Provide the DDL migration script to apply the changes.

STRUCTURE:
1. Performance Diagnosis.
2. Proposed Fix (SQL Code).
3. Predicted Benchmark Improvement.
4. Technical Rationale: Why this index?

TONE: Expert, precise, high-performance.

Launch Prompt

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

Similar Research & Data Prompts