Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Bex
Aged Yak Warrior
580 Posts |
Posted - 2009-02-25 : 07:08:07
|
You will have to excuse my ignorance on this topic.......If you have a table who's data, once uploaded, is not changed in anyway (so data is uploaded, CREATE INDEXES, CREATE STATISTICS are run), then is there any need to create maintenance plans on that database?If data is not inserted, deleted or updated, then no fragmentation will occur, and the stats will remain as is (if autoupdate is set of off)? Is this correct?Say, perhaps, that some additional data is inserted. The PK is an auto increment IDENTITY field, therefore, additions will be appended to the end of the table. However, indexes reference other columns. At what point/threshold should I consider updating stats/rebuild indexes (for example, we have n rows, another x% of n are added.... what is the threshold of 'x'? (e.g. when the volume of data increases by 20%??)Bascially, we have tables with millions of rows, and I want to avoid having to perform any maintenance if it is not required.ThanksHearty head pats |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-02-25 : 07:53:26
|
quote: Originally posted by Bex You will have to excuse my ignorance on this topic.......If you have a table who's data, once uploaded, is not changed in anyway (so data is uploaded, CREATE INDEXES, CREATE STATISTICS are run), then is there any need to create maintenance plans on that database?If data is not inserted, deleted or updated, then no fragmentation will occur, and the stats will remain as is (if autoupdate is set of off)? Is this correct?Say, perhaps, that some additional data is inserted. The PK is an auto increment IDENTITY field, therefore, additions will be appended to the end of the table. You can guarantee that fragmentation won't occur in this case. It depends on Fill Factor and fragmentation level of pages.However, indexes reference other columns. At what point/threshold should I consider updating stats/rebuild indexes (for example, we have n rows, another x% of n are added.... what is the threshold of 'x'? (e.g. when the volume of data increases by 20%??)Read this:http://support.microsoft.com/kb/195565Bascially, we have tables with millions of rows, and I want to avoid having to perform any maintenance if it is not required.ThanksHearty head pats
|
 |
|
Bex
Aged Yak Warrior
580 Posts |
Posted - 2009-02-25 : 08:09:21
|
Thanks. I'll have a read of that article.By the way, your sentence:You can guarantee that fragmentation won't occur in this case. It depends on Fill Factor and fragmentation level of pages.Did you mean to say 'can't' rather than can?Hearty head pats |
 |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-02-25 : 08:15:37
|
quote: Originally posted by Bex Thanks. I'll have a read of that article.By the way, your sentence:You can guarantee that fragmentation won't occur in this case. It depends on Fill Factor and fragmentation level of pages.Did you mean to say 'can't' rather than can?Hearty head pats
Yes you are right. |
 |
|
Bex
Aged Yak Warrior
580 Posts |
Posted - 2009-02-25 : 08:21:38
|
Ok, no probs. So just to clarify, fillfactor is the configurable amount of space left free on a page. What is fragmentation level?ThanksHearty head pats |
 |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-02-25 : 08:41:21
|
quote: Originally posted by Bex Ok, no probs. So just to clarify, fillfactor is the configurable amount of space left free on a page. What is fragmentation level?ThanksHearty head pats
Please read Booksonline. It has all details |
 |
|
ahmad.osama
Posting Yak Master
183 Posts |
Posted - 2009-02-25 : 14:17:43
|
quote: Originally posted by Bex You will have to excuse my ignorance on this topic.......If you have a table who's data, once uploaded, is not changed in anyway (so data is uploaded, CREATE INDEXES, CREATE STATISTICS are run), then is there any need to create maintenance plans on that database?If data is not inserted, deleted or updated, then no fragmentation will occur, and the stats will remain as is (if autoupdate is set of off)? Is this correct?Say, perhaps, that some additional data is inserted. The PK is an auto increment IDENTITY field, therefore, additions will be appended to the end of the table. However, indexes reference other columns. At what point/threshold should I consider updating stats/rebuild indexes (for example, we have n rows, another x% of n are added.... what is the threshold of 'x'? (e.g. when the volume of data increases by 20%??)Bascially, we have tables with millions of rows, and I want to avoid having to perform any maintenance if it is not required.ThanksHearty head pats
You can use DMVs to filter out the used indexes and can then REORGANISE Or REBUILD as needed...As BOL says If fragmentation level is <= 30 then REORGANISE else REBUILDRegards,Ahmad Osama |
 |
|
|
|
|
|
|