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 |
|
chris_cs
Posting Yak Master
223 Posts |
Posted - 2008-11-18 : 11:28:15
|
| I'm writing a script that will run periodically to re-build/re-organise all of the indexes in a database if required.I have been told that to determine whether or not the Index should be re-built/re-organised I should look at the values for avg_fragmentation_in_percent and take the required action, also depending on whether the index is internal or external.Could someone clarify what is meant by internal or external?Thanks in advance |
|
|
lionofdezert
Aged Yak Warrior
885 Posts |
Posted - 2008-11-18 : 12:12:37
|
| read it carefully resolve your confusion.http://msdn.microsoft.com/en-us/library/ms189858.aspx |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-11-18 : 17:45:02
|
| Internal Fragmentation: It is caused when pages are not full leading page splits which causes you to scroll through lot of pagesExternal Fragmentation: When pages are not in order and lots of pages have to be swapped back and forth to achieve required data. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
chris_cs
Posting Yak Master
223 Posts |
Posted - 2008-11-19 : 06:12:49
|
| Thanks all for the information.It was most helpful. |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-11-19 : 07:12:06
|
| You are welcome.Average logical and Scan fragmentation you see are all External Fragmentation . |
 |
|
|
|
|
|