Home Forums SQL Server 2005 Administering Defragmenting a MDF file increasing allocated free space RE: Defragmenting a MDF file increasing allocated free space

  • Darren.Siegert (3/26/2009)


    His action was to run a shrink database command and then reduce the allocated free space by 50%.

    Rebuild all of your indexes (perhaps after growing the file by 20% or so).

    Shrinking causes massive fragmentation and will just result in the data file growing again next time data gets added. When that happens, the entire system will slow down as the file is expanded. Also repeated shrinks and grows will cause fragmentation at the file-system level, which is hard to fix.

    See - http://sqlinthewild.co.za/index.php/2007/09/08/shrinking-databases/

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass