What if Autogrow option is off and autoshrink option is on in a database.

  • What if Autogrow option is off and autoshrink option is on in a database. Will there be a problem is data grow after autoshrink...in other words...what autoshrink option do?

  • It'll mean that, if the data every grows beyond the size of the allocated files, you'll get errors. Not having autogrow on is what will cause that. What that means is you'll have to monitor the database yourself and make sure to grow it when it needs it. Since autoshrink is on, that'll probably be pretty constantly.

    Having autoshrink on will also cause the data, both tables and indexes, to fragment. The speed of this will be dependent on how transactional the database is.

    If, for example, the database were a list of all living people who had survived World War II, it would be added to very infrequently, if at all, but it would have people deleted pretty regularly. In that case, it wouldn't need to grow, and autoshrink would possibly be a very minor matter.

    For anything more transactional than that, that combination will almost certainly result in a very slow database that crashes on a very frequent basis.

    For a database where the data never changes at all, you certainly don't need autogrow, and autoshrink won't hurt anything, but only because it won't do anything.

    Make sense?

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 2 posts - 1 through 1 (of 1 total)

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