sp_updatestats or sp_recompile

  • could anyone explain me what is better ..sp_updatestats or sp_recompile any why?

    [font="Arial Narrow"]Failure is not the worst thing. The worst Thing is not to try[/font]
  • Virender Sihag (7/16/2012)


    could anyone explain me what is better ..sp_updatestats or sp_recompile any why?

    The answer as always is : it depends.

    Both do something completely different. One updates statistics and the other recompiles all cached plans of a SP or Trigger.

    Now, I remember Kimberly Tripp[/url] and Jonathan Kehayias[/url] mentioning that updating statistics can invalidate existing cached plans.

    Check out their Blogs and have a look at their statistics tags.

  • thanks hopper.. i will check where exactly my team require this.

    [font="Arial Narrow"]Failure is not the worst thing. The worst Thing is not to try[/font]

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

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