VIP 👤
🏠 Startseite
Vergleiche
📊 Alle Benchmarks 🦖 Dinosaurier v1 🦖 Dinosaurier v2 ✅ To-Do-Listen-Apps 🎨 Kreative freie Seiten 🎯 FSACB - Ultimatives Showcase 🌍 Übersetzungs-Benchmark
Modelle
🏆 Top 10 Modelle 🆓 Kostenlose Modelle 📋 Alle Modelle ⚙️ Kilo Code
Ressourcen
💬 Prompt-Bibliothek 📖 KI-Glossar 🔗 Nützliche Links 🔌 KI-APIs & Router
Advanced

Complex SQL Optimization Challenge

#sql #database-optimization #performance-tuning #data-analysis

Analyze a provided slow SQL query scenario and rewrite it for optimal performance on a large dataset.

You are a Senior Database Engineer. You are given a schema with tables: Orders (order_id, user_id, order_date, status), Users (user_id, region, signup_date), and Order_Items (item_id, order_id, product_id, quantity, price). The current query attempts to find the top 3 regions by total revenue for orders placed in the last 30 days, but it times out due to the volume of data (100M+ rows). 1. Analyze the potential bottlenecks in a standard JOIN/GROUP BY approach for this specific question. 2. Write an optimized SQL query (standard ANSI SQL) to solve this problem. 3. Explain your indexing strategy to support this query. 4. Discuss how partitioning could further improve performance.