In this video, I dive into a common performance issue in SQL Server queries: multiple distinct aggregates and how they can significantly slow down row mode operations. I explain the challenges these aggregates pose, particularly when used extensively, and demonstrate why batch mode can be a game-changer for improving query performance. However, I also highlight some of the limitations faced by Standard Edition users, such as the lack of full support for certain features that could otherwise optimize queries more effectively. The video covers practical solutions like using temporary objects or adjusting compatibility levels to leverage batch mode and columnstore indexes, providing clear examples and detailed explanations to help viewers understand these concepts better.
CHAPTERS
00:00:00 - Introduction and Video Purpose
00:02:46 - Multiple Distincts in Row Mode Queries
00:07:38 - Performance Impact of Multiple Distincts
00:12:59 - Enterprise Edition Solutions
00:15:29 - Standard Edition Considerations
00:18:51 - Recap and Conclusion
━━━━━━━━━━━━━━━━━━━━━━━━━━
📚 TRAINING & COURSES
━━━━━━━━━━━━━━━━━━━━━━━━━━
Get AI-Ready With Erik
https://training.erikdarling.com/get-...
SQL Server Performance Engineering Course
https://training.erikdarling.com/sql-...
Learn T-SQL with Erik
https://training.erikdarling.com/lear...
Everything Bundle:
https://training.erikdarling.com/?cou...
━━━━━━━━━━━━━━━━━━━━━━━━━━
🛠️ CONSULTING & SERVICES
━━━━━━━━━━━━━━━━━━━━━━━━━━
Need SQL Server performance help?
https://training.erikdarling.com/sqlc...
━━━━━━━━━━━━━━━━━━━━━━━━━━
💬 CONNECT
━━━━━━━━━━━━━━━━━━━━━━━━━━
Ask questions at Office Hours
https://erikdarling.com/officehours/
Become a channel member
/ @erikdarlingdata
━━━━━━━━━━━━━━━━━━━━━━━━━━