• alex.sqldba (12/8/2016)


    I did expect the free space within the files to be visible. And to an extent it is. It's just not as much as I was expecting.

    Even a single row with even just a single NULL in a single column in it will cause the whole page it lives on to persevere even though all other rows have been deleted. Something similar may happen with Uniform Extents although I don't know for sure and would have to lookup or confirm. That's why the Index Rebuilds have to be done to "release" the space.

    As a bit of a sidebar, I've found that "ONLINE" rebuilds don't do quite as good a job as "OFFLINE" rebuilds do, which may add to what you're seeing a bit. That's a casual observation rather than anything I can prove. I've not taken the time to prove it to myself with an experiment because I've also found that OFFLINE rebuilds are faster and take less space (document by MS) so I try to do OFFLINE rebuilds whenever possible and ONLINE rebuilds only when I can't do the OFFLINE ones.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)