Truncated table DB still shows big

  • I truncated a 9 gig table.

    I expected my DB size to be reduced but when I look at properties 'size' it still is at 9 G.

    There's nothing else in the DB.

    How can I get it to show correctly?

    The MDF is still 9 g also...

    tried cleantable

  • truncating a table frees up space WITHIN the database, so more data can be added without expanding the database. the db assumes that you made room for more data; if it got big once, it might get big again, so there's no sense shrinking it and making it re-grow all over again whend ata is inserted, as that fragments the files and slows things down.,

    that is not the same as SHRINKING the database,which releases the free space back to the operating system. you do that only when you are sure the database will not need all the space it reserved previously.

    if you had a one time conversion that expanded the db, and it won't happen again, shrinking might make sense. best practice would be to leave the database alone so that the space is available for future growth.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Thanks Lowell

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

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