Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2010

    Unanswered: Does deleting rows save space?

    How does space management work with DB's in general?

    For example: If I create a table and insert 1000 rows, then delete those 1000 rows, will my db file size on disk shrink?

    IF NOT, will it re-use the space of the 1000 deleted rows first -- before using any new space?


  2. #2
    Join Date
    Mar 2009
    Pages will get flagged for re-use if there is no longer current data in them.

    If you want the disk space reclaimed you can shrink the database file, bearing in mind that disk activity is the limiting factor in the speed of the database engine so if you shrink it and it then needs to expand the file again to put 1000 rows back in you'll slow down your inserts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts