VIP 👤
🏠 Ana Sayfa
Benchmarklar
📊 Tüm Benchmarklar 🦖 Dinozor v1 🦖 Dinozor v2 ✅ To-Do List Uygulamaları 🎨 Yaratıcı Serbest Sayfalar 🎯 FSACB - Nihai Gösteri 🌍 Çeviri Benchmarkı
Modeller
🏆 En İyi 10 Model 🆓 Ücretsiz Modeller 📋 Tüm Modeller ⚙️ Kilo Code
Kaynaklar
💬 Prompt Kütüphanesi 📖 YZ Sözlüğü 🔗 Faydalı Bağlantılar 🔌 Yapay Zeka API'leri ve Yönlendiriciler
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.