Reindex - database grow

  • Hi,

    When i reindex my databases they grow in size.

    Casn someone explain way?

    Thank you

  • This is a logged operation, and so two copies of the index are needed until the reindexing is finished.

    Your databases are growing because you have not properly sized them. The database should have enough free space for normal operation, including reindexing, as well as enough space for data growth for the next month at least. Maybe people ensure they have enough space for 3-6 months.

    You want to manage your space, not expect autogrow to do it for you. Make the files large enough for operations, and grow them periodically, a few times a year.

  • Thank's for reply.

    I understand that.

    But in my case, it is not the Log that grow, but the data file.

    Why?

    thank you

    P.s - my database is in simple recovery model, that's why the log dont grow (i'm aware of the the danger in simple recovery model)

  • Everything is still logged in simple mode. Once the transaction commits, the space is reused.

    The index is rebuilt as a separate copy, that's in the data file, and you need the space for that to occur. You have two copies until the rebuild is finished.

    Again, if the file grows, you are not keeping enough free space in there.

  • I understud.

    Thank you very much

  • When the rebuild is finish in the data file , the cppy of the index is eliminated from the datafile?

  • Yep.

    Mj

  • But the space is not reclaimed. I wouldn't shrink the file as this is now giving a better picture of the space you truly are beginning to need - for maintenance jobs anyway.

    -- You can't be late until you show up.

  • Terry is correct. The space is available to be re-used by the next reindex job, or by data growth, but the file size does not shrink as far as the OS is concerned.

  • Strange... very strange....

    I know i should not make a shrink, because of all that was written in this post, but i have tried because i'm in the dev. enviroment and the space was not releaced to the OS.

    Why? even with shrink it does not free the space, after a reindex?

    Thank you.

Viewing 10 posts - 1 through 9 (of 9 total)

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