How SQL Server 2022 Parameter Sensitive Plan Optimization overcomes problem of parameter sniffing
Are you afraid of Parameter Sniffing and don't know how to resolve them? Then Watch this video to understand 9 different ways to address them.
After watching this you will be able to address the below
1)What happens if we turn off Parameter sniffing?
2)Is there a way to identify that Parameter sniffing is happening?
3)How will you turn off Parameter sniffing at instance level/DB level/Query Level?
4)From which version of SQL can we turn off Parameter sniffing at DB level?
5)How will you conclude if the statistics is the problem to blame for if estimated and actual no of rows are way off?
6)From where SQL Server estimates no of rows will it get it from histogram or Density Vector?
7)What are the use cases Where SQL Server Estimates from Density vector?
8)What are the use cases Where SQL Server Estimates from Histogram?
9)Finally How will you address Parameter sniffing issue?
you will come to know with demos about all the below techniques
1) Stored Procedure level recompile
2) Statement level recompile
3) Using Local Variables
4) optimize for Value
5) optimize for Unknown
6) create a table to hold histogram
7) force the plan from the Query store
8) if you are on SQL Server 2022 turn on PSP
9) The best solution of course covering indexes