Erik Darling and Kendra Little Rate SQL Server Perf Tuning Techniques
May 20, 2024
auto_awesome
Join SQL Server experts Erik Darling and Kendra Little as they explore a treasure trove of performance tuning techniques. They rate everything from recompile hints to scalar UDFs, adding humor to the complexities of optimization. Discover their takes on new features like the Query Store and the Resource Governor. They debate the merits of Common Table Expressions and index rebuilding while reflecting on memory management. With insights on filtered indexes and the future of T-SQL, this conversation is a must-listen for anyone passionate about SQL Server performance.
Recompile hints are regarded positively for their simplicity and effectiveness in resolving complex query performance issues rapidly.
Kendra and Eric express cautious optimism towards Query Store hints, noting their potential to optimize poorly performing queries without application code changes.
Table variables are rated poorly due to inefficiencies, with the hosts recommending preferring temp tables for better performance outcomes.
Deep dives
Introduction of Hosts
The episode begins with host Kendra Little and guest Eric Darling introducing themselves. Kendra humorously describes her background and the content she shares on her website focused on SQL Server topics. Eric shares his identity as a performance tuning consultant while joking about the commonality of his name. They engage in light banter about other individuals with the same name, setting a relaxed tone for the discussion.
Performance Tuning Training Announcement
Kendra and Eric promote their upcoming performance tuning training sessions at the Data Community Summit in Seattle. The two are co-teaching sessions designed to enhance SQL Server performance tuning skills. They describe their approach as offering in-depth reviews and comparisons of different tuning methods in a humorous manner. Kendra emphasizes the importance of attending their sessions, playfully stating that anyone who attends other sessions will no longer be friends with her.
Recompile Hints Discussion
Recompile hints are rated as a favorable performance tuning technique, with Kendra giving them high marks. She appreciates the simplicity and effectiveness of using recompile options to quickly resolve complex query performance issues. Eric echoes her sentiment, noting that while there are caveats, the benefits often outweigh the risks when used appropriately. Both hosts encourage responsible usage of recompile hints to avoid potential drawbacks.
Query Store Hints Evaluation
Kendra and Eric discuss Query Store hints, expressing cautious optimism about their potential utility. Although they reveal limited personal experience with SQL Server 2022 features, they acknowledge the promise of hinting for reworking inefficient queries. Both rate Query Store hints positively since they can optimize poorly performing queries without modifying the application code. They agree that special consideration is needed to prevent the Query Store from becoming read-only in certain conditions.
Table Variables and Their Performance Implications
The hosts express strong skepticism about using table variables for performance tuning, rating them poorly due to potential inefficiencies. They discuss the pitfalls of using table variables, especially in complex relational math scenarios, which can significantly slow down query performance. Both emphasize the importance of opting for temp tables instead of table variables whenever possible and mention that while there have been improvements, many drawbacks still exist. Ultimately, they recommend a cautious approach to table variables, urging users to prove their effectiveness before implementing them.
Erik Darling joins Kendra Little to rate different SQL Server Performance Tuning Techniques in episode 81 of the Dear SQL DBA podcast. We share our opinions of... (deep breath)
Recompile hints, Query Store hints and plan forcing, CTEs, Resource Governor, the legacy cardinality estimator, Table Variables, Automatic Plan Correction, Batch Mode, index rebuilds, Hekaton, NOLOCK, page compression, partitioning, filtered indexes, columnstore, join hints, PSPO, indexed hints, indexed views, optimize for unknown, RCSI, adding more memory, restarting the damn thing, scalar UDFs, and Persisted Memory Grant Feedback.
Get the Snipd podcast app
Unlock the knowledge in podcasts with the podcast player of the future.
AI-powered podcast player
Listen to all your favourite podcasts with AI-powered features
Discover highlights
Listen to the best highlights from the podcasts you love and dive into the full episode
Save any moment
Hear something you like? Tap your headphones to save it with AI-generated key takeaways
Share & Export
Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more
AI-powered podcast player
Listen to all your favourite podcasts with AI-powered features
Discover highlights
Listen to the best highlights from the podcasts you love and dive into the full episode