Reindexing and fragmentation

  • The CLIENTS table has just one key (primary) clustered on clientCode (int data type)

    We use this table for SELECT query only. If we have to insert clients ( we do so 3 or 4 times a year) we insert in another table on another server and the data is replicated over to this CLIENTS table.

    The fillfactor of this CLIENTS table was 0 and the frgmentation was 50%

    Since this table is used for SELECT I rebuild the index with fillfactor 100 however now the fragmettion is up to 77%

    I was thinking with fillfactor=100 the fragmentation should have been negligible.

    Thanks

  • how many row???

    what size in kbytes?


    [font="Times New Roman"]rfr.ferrari[/font]
    DBA - SQL Server 2008
    MCITP | MCTS

    remember is live or suffer twice!
    the period you fastest growing is the most difficult period of your life!
  • rfr.ferrari (1/5/2012)


    how many row???

    what size in kbytes?

    total number of rows - 361

    I don't know how to find the kb.

  • Guras (1/5/2012)


    total number of rows - 361

    I don't know how to find the kb.

    361 rows???

    the size is in property of table - storage!!!


    [font="Times New Roman"]rfr.ferrari[/font]
    DBA - SQL Server 2008
    MCITP | MCTS

    remember is live or suffer twice!
    the period you fastest growing is the most difficult period of your life!
  • Guras (1/5/2012)


    rfr.ferrari (1/5/2012)


    how many row???

    what size in kbytes?

    total number of rows - 361

    I don't know how to find the kb.

    With 361 rows, you do not need to worry about index fragmentation.

    Jared
    CE - Microsoft

  • If the size is less than 8 pages, it's going to be stored on mixed extents and defragging is going to be an utter waste of time. You might even see fragmentation go up on occasion.

    ----------------------------------------------------The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood... Theodore RooseveltThe Scary DBAAuthor of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd EditionProduct Evangelist for Red Gate Software

  • how many time to execute the select command in table?


    [font="Times New Roman"]rfr.ferrari[/font]
    DBA - SQL Server 2008
    MCITP | MCTS

    remember is live or suffer twice!
    the period you fastest growing is the most difficult period of your life!
  • rfr.ferrari (1/5/2012)


    how many time to execute the select command in table?

    It takes about a second to return all the 361 rows.

  • Why are you concerned here... Are you experiencing performance problems or are you just digging?

    Jared
    CE - Microsoft

  • I dont think you should worry on this fragmentation.

    Don’t do anything if the index has < 1000 pages

  • Well actually I'd be concerned if it took 1 whole second to return so little data.

    But I'll go on a limb and assume it's much less than 1 and let it slide for now πŸ˜‰

  • I hope this link can help you to understand the topic.

    http://sqlblog.com/blogs/kalen_delaney/archive/2008/02/28/fragmentation-revisited.aspx

  • Ninja's_RGR'us (1/6/2012)


    Well actually I'd be concerned if it took 1 whole second to return so little data.

    But I'll go on a limb and assume it's much less than 1 and let it slide for now πŸ˜‰

    Let me re-phrase this...the rows are returned at the blink of an eye πŸ™‚ so definitely I am letting it slide by.

  • SQLKnowItAll (1/5/2012)


    Why are you concerned here... Are you experiencing performance problems or are you just digging?

    Just digging...

  • Guras (1/6/2012)


    SQLKnowItAll (1/5/2012)


    Why are you concerned here... Are you experiencing performance problems or are you just digging?

    Just digging...

    Fragmentation being displayed as a percentage of say anywhere under 100 pages is meaningless. Rebuilding the index will not fix this. Think of it this way, if I have a puzzle with only 5 pieces is it really that hard to put together? Even with the pieces out of order you can tell what the image is. As the number of pieces increase the percentage of 100, 90, 80, whatever, means that more pieces are out of order. That's when fragmentation matters. Some articles even say that unless the index is 1000 pages, fragmentation does not matter. Take a look at this article, it may help you:

    http://sqlblog.com/blogs/kalen_delaney/archive/2008/02/28/fragmentation-revisited.aspx

    Jared
    CE - Microsoft

Viewing 15 posts - 1 through 15 (of 19 total)

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