🏠 Home
Benchmark
📊 Tutti i benchmark 🦖 Dinosauro v1 🦖 Dinosauro v2 ✅ App To-Do List 🎨 Pagine libere creative 🎯 FSACB - Ultimate Showcase 🌍 Benchmark traduzione
Modelli
🏆 Top 10 modelli 🆓 Modelli gratuiti 📋 Tutti i modelli ⚙️ Kilo Code
Risorse
💬 Libreria di prompt 📖 Glossario IA 🔗 Link utili
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.