Sql-server – What would cause a table with 80,000 records to use 145GB of space

sql serversql-server-2012storage

I have a table that gets inserted and deleted from every day. On average the record count is 80,000. Roughly 20 fields, 10 of which are VARCHAR(4000) however most of the records have those fields empty. 1 NC Index account for 8MB.

The job that loads this table runs as expected with no performance issues.

This table has been slowly growing 1GB a day with MINIMAL record count increase(sometimes decrease). I cant seem to pin point what would cause this. Any help is greatly appreciated!

Best Answer

Create a clustered index so that your table is not a heap. When a row is deleted from a heap, the space will not be reused. Even empty pages don’t get cleared up. This problem won’t happen if your table is a clustered index.