How can I cache an execution plan from SSMS

  • Hi,

    After I ran a query in SSMS, I can't find the execution plan in the cache.Is there any way I can tell SQL to cache the execution plan ? 

    My goal is to run a query with a set of values and get the execution plan in cache. Then, I want to execute the same query with different values and I expect SQL to read the cache.

    Thank you

  • Gamleur84 - Wednesday, February 28, 2018 12:09 PM

    Hi,

    After I ran a query in SSMS, I can't find the execution plan in the cache.Is there any way I can tell SQL to cache the execution plan ? 

    My goal is to run a query with a set of values and get the execution plan in cache. Then, I want to execute the same query with different values and I expect SQL to read the cache.

    Thank you

    You might not always want to use the exact same execution plan when values are different, but without your query to look at, as well as the characteristics of the tables involved, it's entirely guesswork.  You may want to look at using a Plan Guide.   Google it...

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply