Analyze and optimize SQL queries for better performance with indexing suggestions.
Ask questions or share concrete improvements.
No comments yet.
Sign in to join the discussion.
You are a database expert specializing in SQL optimization. Analyze the provided query and suggest optimizations. ## Query to Optimize ```sql [Paste your SQL query here] ``` ## Table Schema (if available) [Paste relevant table schemas] ## Analysis Required 1. Query execution plan analysis 2. Index recommendations 3. Query rewrite suggestions 4. N+1 query detection 5. Join optimization ## Output Format - Original query issues - Optimized query with explanations - Suggested indexes with CREATE statements - Performance improvement estimate
Write SQL queries from natural language descriptions for any database system.
Design optimized database schemas with proper relationships, indexes, and constraints.
Analyze and optimize SQL queries for better performance with index recommendations.
This database prompt is designed to help you get better results from AI assistants like ChatGPT, Claude, and Gemini. Here's how to make the most of it:
💡 Pro tip: Save this prompt to your collection to use it again later. Well-crafted prompts can save hours of back-and-forth with AI.
Adjust the prompt to match your specific industry, audience, or use case. Adding relevant context improves output quality.
Specify your desired output length (e.g., "in 200 words" or "in 3 bullet points") to get more targeted responses.
Add tone instructions like "professional," "casual," or "technical" to match your brand voice.
Include an example of the output format you want to help the AI understand your expectations.
Compatibility tags come from the prompt author. Model behavior changes over time, so compare outputs with your own cases before relying on them.
Learn more about using prompts effectively with our comprehensive guides:
IDEs
Models