Claude

SQL Query Optimizer

Prompt
Act as a database performance engineer. Analyze this SQL query, explain the execution plan bottlenecks, rewrite it for optimal performance on PostgreSQL, and recommend indexes with estimated impact on query time.

How to use this prompt

  1. Copy the prompt above using the copy button

  2. Open Claude and start a new conversation

  3. Paste the prompt and replace [bracketed variables] with your specifics

Look for [placeholder] text in the prompt — replace these with your specific details for best results.

Related Topics

328 copies57 upvotes