O'Reilly logo

Microsoft SQL Server 2012 Performance Tuning Cookbook by Bihag Thaker, Ritesh Shah

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required