PromptsVault AI is thinking...
Searching the best prompts from our community
ChatGPTMidjourneyClaude
Searching the best prompts from our community
Click to view expert tips
Specify framework versions
e.g., 'Next.js 14', 'Python 3.11' for accurate, up-to-date code
Request error handling & types
Ask for TypeScript definitions and try-catch blocks
Get step-by-step breakdowns
Request explanations before code for complex logic
Optimize a slow-running SQL query on a 50M+ row table. Techniques to apply: 1. Add appropriate indexes on WHERE and JOIN columns. 2. Replace subqueries with CTEs (Common Table Expressions). 3. Use EXPLAIN ANALYZE to identify bottlenecks. 4. Partition large tables by date for faster scans. 5. Rewrite correlated subqueries as window functions. Provide before/after execution times and explain each optimization decision.