🏠 Hem
Benchmarkar
📊 Alla benchmarkar 🦖 Dinosaur v1 🦖 Dinosaur v2 ✅ To-Do List-applikationer 🎨 Kreativa fria sidor 🎯 FSACB - Ultimata uppvisningen 🌍 Översättningsbenchmark
Modeller
🏆 Topp 10 modeller 🆓 Gratis modeller 📋 Alla modeller ⚙️ Kilo Code
Resurser
💬 Promptbibliotek 📖 AI-ordlista 🔗 Användbara länkar
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.