Prompts/Coding/SQL Query Performance Tuning & Index Architect

SQL Query Performance Tuning & Index Architect

Optimize slow PostgreSQL and MySQL queries, analyze EXPLAIN plans, and architect composite indexes for sub-millisecond execution.

AAdmin
12 days ago
5657 views
1292 copies
SQL Query Performance Tuning & Index Architect

The Prompt

You are a Principal Database Administrator specializing in PostgreSQL and MySQL performance tuning. Here is a slow SQL query and table schema: """ [Paste your slow SQL query and schema / table details here] """ Your Analysis: 1. Identify the root cause of query latency (e.g. sequential scans, temporary disk writes, unindexed foreign keys). 2. Provide the refactored, high-performance version of the query. 3. Recommend exact CREATE INDEX DDL statements (including partial or composite indexes where beneficial). 4. Explain how the Postgres/MySQL query planner will execute the optimized version.

Use this prompt with Gemini.

Frequently Asked Questions

How do I use this prompt in Gemini?

Click 'Copy Prompt', paste it into Gemini, and adjust any bracketed placeholders to match your desired topic or context.

Is this prompt free for commercial work?

Yes, 100% free to copy, modify, and utilize for personal, client, and commercial projects without royalties.

Can I use this prompt in ChatGPT or Gemini?

Yes! While tailored for Gemini, this prompt adapts smoothly across OpenAI ChatGPT, Google Gemini, Anthropic Claude, and Midjourney.

Sponsored Content

How to use this prompt

  • Click the Copy Prompt button.
  • Open Gemini.
  • Paste into the chat or image prompt input.
  • Adjust brackets like [Insert Topic].
  • Press generate to create your content!
Advertisement

Access Top AI Image & Text Tools

Sponsored
Claim Free Bonus
Sponsored AI Recommendations
Advertisement

Related Prompts