Page Splits And Fill Factor

  • Page Splits

    -------------

    When page split happens - which part of the row is moved? Is the whole row copied to a new location [or] that part of the row which cannot be accommodated is copied over?.

    Fill Factor

    -----------

    "Page spilts will be reduced by specifying fill factor"

    This is something I read and got confused thinking about the inserts and updates. There is a certain % of space that will be reserved on setting the fill factor (Okay accepted !!). But, Is the space reservation applied only when entering the data for the first time in the page?

    Will the reservation space be consumed while updating and inserting new records? Is this how fill factor help in update and insert.

  • For a good discussion of why page splits occur and what happens, read the following (It contains sample code and results to make understanding much easier)

    http://sqlblogcasts.com/blogs/tonyrogerson/archive/2007/06/28/what-is-a-page-split-what-happens-why-does-it-happen-why-worry.aspx

    The above blog also contains this link, (to a Paul Randal blog post) which further explains (with sample code) what occurs / causes page splits.

    http://blogs.msdn.com/b/sqlserverstorageengine/archive/2006/12/13/more-undocumented-fun_3a00_-dbcc-ind_2c00_-dbcc-page_2c00_-and-off_2d00_row-columns.aspx

    Corrected spelling of Paul Randal's name

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • Thank you

    According to the blog .. The complete row is transferred to the new page. But it still does not answer my question about the Fill Factor. May be I need to do more study on this topic.

    Anyways, Thanks again for the reply.

  • The fill factor only applies when an index is created or rebuilt.

    SQL server does not try to maintain the fill factor when updating or inserting values.

    Quote from BOL:

    The fill factor setting applies only when the index is created, or rebuilt. The SQL Server Database Engine does not dynamically keep the specified percentage of empty space in the pages. Trying to maintain the extra space on the data pages would defeat the purpose of fill factor because the Database Engine would have to perform page splits to maintain the percentage of free space specified by the fill factor on each page as data is entered.

  • Excellent ! Just the answer I was looking for. Thank you steven.

    Here is an extract from microsoft url about the fill factor.

    http://msdn.microsoft.com/en-us/library/aa196711(SQL.80).aspx

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply