t-sql query not use same execution plan

  • Hello friends

    if t-sql query is perfectly run in development and when I execute in production at that time I want to use execution plan which is in development . so how I can do using cache? I know about hint we can use hint USE_PLANE. but I want to do with cache .

  • Figure out why the plans are different (probably has to do with data volume), then figure out if you really want production using the development plan (hint, you usually don't, due to different row counts).

    If you still think prod is using the wrong plan after all of that, then change whatever it is that is causing the different plans (which you figured out in step 1)

    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 2 posts - 1 through 1 (of 1 total)

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