• Fill factor is not a representation of index fragmentation. The fill factor setting tells SQL Server how full to fill the index pages when creating a new index. If you specify 80%, the index building operation will fill each page to 80% of capacity and then move on to a new page. The idea of leaving free space is that eventually, in the event of a clustered index since it is the data row, you'll be updating the row and the row update could require more space. If there if free space in the page, the update can happen right there with no problem. If there is not free space, you end up with what we call a page split. Page splits have a negative impact on I/O. You can also get page splits when INSERTing data if the clustered index is build on an non-sequential column. Since the clustered index physically orders the data, creating a clustered index on an non-sequential value means that the data must be moved around so the the newly inserted row has room in the correct order on that page.

    Long story short, the free space is there so as to avoid page splits and increase insert/update performance. Having the fill factor set for too much free space will have a negative impact on your SELECT queries as more data pages will need to be read into the buffer to satisfy the query results. This leaves us, as the DBAs, with the task of balancing out the negative side effects of page splits with the negative side effects of too much free space.

    Keep in mind that the fill factor setting is only relevant when creating (or re-creating) an index. Once the index has been created, SQL Server will not keep the pages at that percentage of fullness. This is why we do maintenance on indexes.

    Make sense?

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden