Question: How to Recompile Stored Procedure?
Answer: The answer to this question is here:
EXEC sp_recompile ‘NameofSP’
Let us read more about it.
Question: How to Recompile Stored Procedure?
Answer: The answer to this question is here:
EXEC sp_recompile ‘NameofSP’
Let us read more about it.
Question: How to Map Network Drive as Fixed Drive in SQL Server?
love little problems like this one as they are indeed a lot of fun to resolve.
Parameter sniffing fixes compared on one table show a clear order, from a cheap guess to a better index. This post runs the plain procedure, a local variable, OPTIMIZE FOR UNKNOWN, a scoped setting, OPTION (RECOMPILE) and a covering index on the same skewed table, and prints the page reads of each in both call orders.
The OPTION (RECOMPILE) hint tells SQL Server to build a new plan every time a statement runs. This post measures the page reads it saves on skewed data, the compile cost it adds, the filtered index it unlocks, and how to apply it to one statement of a procedure.
A database scoped configuration lets you turn off parameter sniffing for one database with a single statement. This post measures a procedure with the setting on and off, shows that the change clears the cached plans of the database, and explains what the switch does not fix.
Question: How to Copy Files in SQL Server?
Answer: SQL Server 2019 has very interesting features that can make a life of DBA’s and Developers very easy.
I consider myself fortunate that I receive a follow-up question from my blog posts. Let’s discuss Parameter Sniffing and OPTIMIZE FOR UNKNOWN.