Friday, March 9, 2012

Reusing Execution Plan

I've created a stored procedure and tried to compare the execution plans by passing different parameters to it. The execution plan in all the cases is displayed as same. But how can i make sure that SQL Server is using the same execution plan from memory each time i execute my stored procedure. I want to make sure its not recreating the execution plan each time i call the stored procedure
Appreciate if anyone can help me to trace that
Lots of thanks in advance.See my other reply. Please don't multipost.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Sudhakar Koolla" <sudhakar.koolla@.wipro.com> wrote in message
news:465AB931-50FE-4F2D-9A7F-143A69B7CEE5@.microsoft.com...
> I've created a stored procedure and tried to compare the execution plans by passing different
parameters to it. The execution plan in all the cases is displayed as same. But how can i make sure
that SQL Server is using the same execution plan from memory each time i execute my stored
procedure. I want to make sure its not recreating the execution plan each time i call the stored
procedure.
> Appreciate if anyone can help me to trace that.
> Lots of thanks in advance.

No comments:

Post a Comment