Why might you create a stored procedure with the with recompile option?

Submitted by: Administrator
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.
Submitted by: Administrator

Read Online Ab Initio Job Interview Questions And Answers