Question : I was looking for missing indexes in the cached execution plans then I found a very nice article […]
Tag: plan-cache
Execution Plan Warnings cardinality xml data type
Question : I have the following statements: — 1st DECLARE @AuditParameters XML = ( SELECT 1 AS AccountID, 2 AS […]
Is execution plan cached “better” for stored procedures than for a non-dynamic query?
Question : Reading different explanations about execution plan caching by Microsoft SQL Server, I’m confused about the benefits of using […]
Execution Plan Warnings cardinality xml data type
Question : I have the following statements: — 1st DECLARE @AuditParameters XML = ( SELECT 1 AS AccountID, 2 AS […]
What happens when a stored procedure executes one of two different queries based on an input parameter?
Question : I have encountered a stored procedure that performs one of two different queries based on an input parameter. […]
Why does changing parameterization style result in lower plans in the plan cache when using sp_executesql?
Question : Generally sp_execute sql will re-use cached plan, where as EXEC will create new plan for each parameter. In […]
How to see if index is being read “ordered” from DMVs
Question : I have a table that is being used in many reporting queries. I would like to know how […]
Why query cache plan kept dynamic queries but not sp?
Question : My company has some legacy system that uses quite a lot of dynamic queries (no parameters). In the […]
Need to maintain execution plans on SQL Server Upgrade 2017 to 2019
Question : We are working on a performance issue and need to maintain the execution plans for troubleshooting. Need to […]
Parameter Sniffing – Running query in code vs in management studio
Question : I just had a problem at work where a stored proc, being called by some C# code, was […]