It defragments the leaf level of clustered and nonclustered indexes on tables and views by physically reordering the leaf-level pages to match the logical, left to right, order of the leaf nodes. Compaction is based on the existing fill factor value.
The first step in deciding which defragmentation method to use is to analyze the index to determine the degree of fragmentation.
By using the system function sys.dm_db_index_physical_stats, you can detect fragmentation in a specific index, all indexes on a table or indexed view, all indexes in a database, or all indexes in all databases.
For partitioned indexes, sys.dm_db_index_physical_stats also provides fragmentation information for each partition.
When is specified, all indexes on the table are dropped and rebuilt in a single transaction.
For partitioned indexes built on a partition scheme, you can use either of these methods on a complete index or a single partition of an index. Read the full story » Mower Parts just announced the opening of their retail store at 7130 Oak Ridge Highway in Knoxville, TN.We have engine parts for Briggs and Stratton, Tecumseh, Kohler, Honda, Kawasaki. Just thought you should know that selections from our Yeah Jam Fury OSTs have been made available on Spotify, Tidal, Deezer, and Apple Music! Also don’t forget you can still win 0 and more in our Stage Builder Contest if you enter by March 16th! We have a live web demo with a fully unlocked stage builder for the duration of the contest!This topic describes how to reorganize or rebuild a fragmented index in SQL Server by using SQL Server Management Studio or Transact-SQL.