🏠 Beranda
Benchmark
📊 Semua Benchmark 🦖 Dinosaurus v1 🦖 Dinosaurus v2 ✅ Aplikasi To-Do List 🎨 Halaman Bebas Kreatif 🎯 FSACB - Showcase Utama 🌍 Benchmark Terjemahan
Model
🏆 Top 10 Model 🆓 Model Gratis 📋 Semua Model ⚙️ Kilo Code
Sumber Daya
💬 Perpustakaan Prompt 📖 Glosarium AI 🔗 Tautan Berguna
hard

Advanced Query Optimization

#sql #database #optimization #performance

Analyze and optimize a highly inefficient SQL query for a large dataset.

Given a scenario with a table 'User_Activities' containing 50 million rows and columns (user_id, activity_type, timestamp, metadata), write an optimized query to find the top 10 users who performed the specific sequence of actions 'Login' -> 'View_Product' -> 'Purchase' within a 30-minute window at least 5 times in the last month. Explain your indexing strategy, join logic, and how you would handle window functions to optimize execution time. Additionally, provide the EXPLAIN ANALYZE output interpretation for your proposed solution.