Sign in to track progress and bookmarks.
As data is modified, deleted, and inserted, your indexes become "Fragmented." This means the physical order of pages on the disk no longer matches the logical order of the index. This results in extra disk I/O and slower query performance.
ALTER INDEX ALL ON Users REBUILD;
Q: "How does 'Fill Factor' help prevent fragmentation?"
Architect Answer: "Fill Factor tells SQL Server to leave a certain percentage of empty space (e.g., 20%) on each page during a rebuild. This space acts as a 'Buffer'. When you insert a new row in the middle, it can fit on the existing page instead of forcing a costly **Page Split**. Setting a Fill Factor of 80 is common for tables that have frequent random inserts."
Quizzes linked to this course—pass to earn certificates.
On this page
1. Internal vs External Fragmentation 2. The Solution: Reorganize vs Rebuild 4. Interview Mastery