Why Might You Create A Stored Procedure With The Recompile Option?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this answer should be reported.
Ch Kashif
Recompile is useful when the tables referenced by the stored proc undergoes a lot of
modification/ deletion/ addition of data. Due to the heavy modification activity the
execute plan becomes outdated and hence the stored proc performance goes down.
If we create the stored proc with recompile option, the sql server wont cache a plan
for this stored proc and it will be recompiled every time it is run