Update stats

  • Hi ,

    In Production server we have executed updatestats for a database manually(which contains 5 tables) on Wensday and it took 1hr to comleted for all the tables.

    For the same database we created a updatestas job to run on sunday and it took around 15 hrs to complete.

    Can any one tell me how to find the cause for taking long time to run the job.

  • To performance tune your procedure to update statistics, I would start by looking at your execution plan. This will tell you what's going on and where.

    You can also run it after firing SET STATISTICS TIME ON and SET STATISTICS IO ON to tell you the time taken by each statement. This will give you statement-by-statement stats on what takes how much time, but it won't tell you the indexes, table scans, etc. that executions plans will.

    If you need to learn execution plans, I'd recommend the book by Grant Fritchey: http://www.sqlservercentral.com/articles/books/94937.

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

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