🏠 Inicio
Pruebas de rendimiento
📊 Todos los benchmarks 🦖 Dinosaurio v1 🦖 Dinosaurio v2 ✅ Aplicaciones To-Do List 🎨 Páginas libres creativas 🎯 FSACB - Showcase definitivo 🌍 Benchmark de traducción
Modelos
🏆 Top 10 modelos 🆓 Modelos gratuitos 📋 Todos los modelos ⚙️ Kilo Code
Recursos
💬 Biblioteca de prompts 📖 Glosario de IA 🔗 Enlaces útiles
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.