🏠 Accueil
Benchmarks
📊 Tous les Benchmarks 🦖 Dinosaure v1 🦖 Dinosaure v2 ✅ To-Do List Apps 🎨 Pages Libres 🎯 FSACB - Showcase 🌍 Traduction
Modèles
🏆 Top 10 Modèles 🆓 Modèles Gratuits 📋 Tous les Modèles ⚙️ Modes Kilo Code
Ressources
💬 Prompts IA 📖 Glossaire IA 🔗 Liens Utiles
advanced

Advanced SQL Query Optimization

#database #sql #optimization #performance

Analyze a slow SQL query and optimize it using advanced indexing and execution plan strategies.

You are a Database Performance Tuning Expert. Analyze the following slow PostgreSQL query: '[Insert SQL Query]'. The table schema is as follows: '[Insert Schema]'. 1. Explain the likely execution path and identify the bottlenecks (e.g., sequential scans, nested loops, hash joins). 2. Propose specific indexes to create to improve performance, explaining the choice of columns (B-Tree, GiST, etc.). 3. Rewrite the query if necessary to improve efficiency, avoiding sub-optimal CTEs or correlated subqueries. 4. Provide the optimized query and a brief explanation of the expected performance gains.