cached execution plan ?

  • So if i'm in enterprise manager sql server 2008 and i have a stored proc call. for example exec getUsers 'yoyo' and i click show execution plan. Will it show me the cached execution plan if it exists or is it going to generate its own execution plan?

  • is this saying that i'm getting a cache hit? If so then how do i read this. It appears to me it showing a cache miss and a cache hit.

    attaching the output from profiler

  • Cached (providing there is a matching cached plan).

    As for the miss and the hit: http://sqlinthewild.co.za/index.php/2010/07/27/hit-and-miss/

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • are u replying to my first or second comment?

  • Both.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • darnit!!!

  • If you don't wan the cached plan, then EXEC <procedure> WITH RECOMPILE and get one fresh for your execution that doesn't affect the plan in cache.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 7 posts - 1 through 6 (of 6 total)

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