When I ran:
SP_Spaceused TEST. I got this output which is very strange for 20918 rows.
Output:
name rows reserved data index_size unused
TEST 20918 6240816 KB 6235480 KB 2304 KB 3032 KB
I Try to gess The reason.
I copy These new records to another table.
select * into TEST1 from TEST
But The result was more strange : on new table the size of these record was
name rows reserved data index_size unused
TEST1 20918 5704 KB 5456 KB 8 KB 240 KB
I tried rebuilding the Index on TEST table, but it was not helpful.
Can someone please explain what could be the reason for this?
Best Answer
I bet it is a heap table. SQL server can be lousy at re-using space for deleted data in a heap. Try having it as a clustered table instead.