Back to Browse

Performance Tuning TOP PERCENT Queries In SQL Server

1.8K views
Aug 9, 2024
18:48

In this video, I delve into performance tuning top and percent queries-a topic that might not come up frequently in your SQL Server work but is crucial when it does. We explore how to optimize these queries by using common indexes effectively and introduce a clever technique involving Common Table Expressions (CTEs) or derived tables to significantly improve query performance. By showing you practical examples, I demonstrate the difference between parameterized and literal values and why using CTEs can make your top percent queries much faster. Additionally, I share some insights on how this pattern applies in real-world scenarios, especially when dealing with large datasets. Whether you're a consultant like me or just looking to enhance your SQL Server skills, there's plenty here to help you tackle these challenging queries more efficiently. CHAPTERS 00:00:00 - Introduction and Setup 00:03:25 - Top Percent Query Performance Issues 00:06:49 - Store Procedure Solution 00:09:18 - Execution Results Comparison 00:12:39 - Handling High Row Counts 00:15:20 - Conclusion and Final Thoughts ━━━━━━━━━━━━━━━━━━━━━━━━━━ 📚 TRAINING & COURSES ━━━━━━━━━━━━━━━━━━━━━━━━━━ Get AI-Ready With Erik https://training.erikdarling.com/get-ai-ready-with-erik?coupon=AIREADY SQL Server Performance Engineering Course https://training.erikdarling.com/sql-server-performance-engineering?coupon=ENGINEERING Learn T-SQL with Erik https://training.erikdarling.com/learn-t-sql-with-erik?coupon=ADVANCEDTSQL Everything Bundle: https://training.erikdarling.com/?coupon=SPRINGCLEANING ━━━━━━━━━━━━━━━━━━━━━━━━━━ 🛠️ CONSULTING & SERVICES ━━━━━━━━━━━━━━━━━━━━━━━━━━ Need SQL Server performance help? https://training.erikdarling.com/sqlconsulting ━━━━━━━━━━━━━━━━━━━━━━━━━━ 💬 CONNECT ━━━━━━━━━━━━━━━━━━━━━━━━━━ Ask questions at Office Hours https://erikdarling.com/officehours/ Become a channel member https://www.youtube.com/@ErikDarlingData/join ━━━━━━━━━━━━━━━━━━━━━━━━━━

Download

0 formats

No download links available.

Performance Tuning TOP PERCENT Queries In SQL Server | NatokHD