Enhance index efficiency by using the REORGANIZE index
If the fragmentation level is less than 30 percent, one must use REORGANIZE
on the index, instead of REBUILD
. The REORGANIZE
index doesn't produce locks on data pages or tables, leaving the object available for users to use, and takes less server resources and CPU utilization, as compared with REBUILD
index.
In short, REORGANIZE
is the process of cleaning up current B-Tree (especially leaf level of index), organizing data pages, and defragmenting it. Unlike REBUILD, REORGANIZE
won't add any new pages; if this is needed, it just cleans up current pages and defragments them.
Getting ready
To decide whether to use a REORGANIZE
index or not, have a look at the fragmentation level of the index first; if it is more than 10 percent and less than 30 percent, you require reorganization of your index. If it is less than 10 percent, you don't need to maintain that index.
How to do it...
Like rebuilding an index, there are several ways to reorganize...