When to use recompile hint in SQL Server?

SQL Server caches the query plan that is generated from the first run of a query/stored procedure with whatever parameter values were used during that first run. Using the RECOMPILE hint is a good solution when your queries aren’t getting ran often or aren’t staying in the the query cache most of the time anyway.
For More Information Please Refer:


You May Also Like to Read: