Answer:
When database is changes by adding indexes or changing data in indexed columns, the query plans to access its tables should be optimized again by recompiling them. This happens automatically the first time a stored procedure is run after SQL Server is restarted. But if a new index is added and it is used by the stored procedure, optimization does not occur until the next time that the stored procedure is run after SQL Server is restarted. so, it can be useful to force the stored procedure to recompile.
|