When we write our queries to the database, SQL Server has to go and figure out the best way to go and bring back the data you asked for. A query plan is created to help SQL Server remember how to get the data for this query. It takes time to make these queries, so the database wants to limit the number of times it has to create the plans so it will try to reuse the plan as much as possible.
Our topic for today's episode is query plan reuse and the pros and cons with this concept. We will also touch on the concept of parameter sniffing--a technique SQL Server uses to try and figure out the best values to use for the execution plan with the hopes the plan will help the most queries. Special thanks to James Youkhanis for the suggestion.
The shownotes for today’s episode is found at http://sqldatapartners.com/2017/07/04/episode-103-plan-reuse/ and have fun on the SQL trail.
Episode 41: Index Maintenance
Episode 40: SQL Server Compression
Episode 39: Set statistics and StatisticsParser.com
Episode 38: SQL Server 2016 Feature Review
Episode 37: PowerBI and the DBA
Episode 36: SQL Server Virtual Machines in Azure
Episode 35: Position Yourself to Better Opportunities
Episode 34: In-Memory Tables
Episode 33: From Developer To DBA
Episode 32: Up Your Game With PowerShell!
Episode 31: What Has Virtualization Done To My Database?
Episode 30: The Best Investment You Can Make
Episode 29: You Thinking What I Am Thinking?
Episode 28: How Do You Know There Is A Problem? Baselines!
Episode 27: Testing Changes Before You Break Production
Episode 26: DevOps for the Database--Everyone is Doing it, Right?
Episode 25: Stretch Database
Episode 24 Query Store
Episode 23: IO, IO, It’s Off to Tune We Go
Episode 22: Eight Years of sp_whoisactive
Create your
podcast in
minutes
It is Free
Insight Story: Tech Trends Unpacked
Zero-Shot
Fast Forward by Tomorrow Unlocked: Tech past, tech future
Lex Fridman Podcast
Elliot in the Morning