Databases Reference
In-Depth Information
9
0
2.031144211239
9
1
88.8888888888889
9
2
0
10
0
2.45464247598719
10
1
40
10
2
0
It's made an improvement. It's not the best it could be, but it was fast.
Now try the next option, ALTER INDEX REBUILD :
ALTER INDEX all ON people REBUILD
After running this command, the indexes look like this:
index_id index_level avg_fragmentation_in_percent
----------- ----------- ----------------------------
1
0
0
1
1
11.7647058823529
1
2
0
6
0
0
6
1
0
6
2
0
7
0
0
7
1
0
7
2
0
8
0
0
8
1
12.5
8
2
0
9
0
0
9
1
0
9
2
0
10
0
0
10
1
0
10
2
0
It's pretty easy to see the large improvement in this over the results from REORGANIZE , and don't forget
that you now have statistics updated with a 100 percent sample size.
Finally, drop and recreate the indexes. After doing this the indexes look like this:
index_id index_level avg_fragmentation_in_percent
----------- ----------- ----------------------------
1
0
0
1
1
0
1
2
0
6
0
0
6
1
0
6
2
0
7
0
0
7
1
0
7
2
0
8
0
0
Search WWH ::




Custom Search