DBCC INDEXDEFRAG and UPDATE STATISTICS

  • I just upgraded from the world of SQL 7 to SQL 2000 a few months.  I have recently found that Indexfrag to work far better in my case and I can schedule it to run pretty often like twice a week in the middle of the night.  I found INDEXDEFRAG to be much faster then REINDEX and the main thing is because the indexes are not rebuild, the trans log stays in check.  I have some really large tables and rebuilding the clustered indexes would make my trans grow to gigantic proportions.

    Now to my question .  Running DBCC REINDEX updates all my stats as well.  With INDEXDEFRAG, would I still need to run "update statistics" separately? Also how often should the stats be updated.

  • - do you  have autoupdate-stats on (at db level) ? just run it once in a while.

    We just run it once in a while (4 times a year) because autoupdatestats is on.

    - If your data dos not change that much in cardinality of data and number of rows, you might choose to run sp_updatestats just once. If you don't know its variation, schedule it once a month to start with.

    - don't forget to run dbcc updateusage ('yourdb') with countrows every now and then.

     

     

     

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

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

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