• Loner (6/26/2008)


    Why not shrink the database?

    Generally speaking, if SQL needed the file space once, it is going to need it again. Shrinking the files is usually a waste of I/O.

    When you are shrinking, you're usually during a slow period, so no big deal. However, when SQL needs more space it is almost always (just ask Murphy) when your server is at its busiest. You'll be wasting disk IO when you need it most to fulfill requests.

    If you do some one-off processing that is never going to happen again or truncate out a bunch of data that will never be replaced, go ahead and shrink. If you are tight on space, get more space. Playing the shrink game will buy you some time, but you'll be sorry you did when there is no longer room to "shrink" and your production database can't function until the drives arrive from your favorite vendor tomorrow morning.

    Kyle