What cause a negative index size?
Posted on 2006-06-08
I currently have a database that shows a number of tables with negative index sizes. When I run the following command in the query analyzer: exec sp_MSForEachTable 'EXEC sp_spaceused @objname=''?'' '
I get weird results like:
Table Rows Reserved Data Index Size Unused
TableA 2542349 185024 KB 184552 KB -8 KB 480 KB
TableB 7810227 2060632 KB 2022464 KB -96 KB 38264 KB
A little history. TableB had grown to 15 times it's current size and had the same data it currently has. The index size was 4 times larger than the data even though the table had no indexes. It is a staging table and gets wiped and reloaded daily. It was causing a space crunch on the server. I shrunk the data and log files and the table size didn't change. I then ran a dbbc reindex and a dbbc indexdefrag on the table and then shrunk the files again. That's when I got the results above.
I have my space back but now I have these negative indexes. In my mind this is an impossibility. Can anyone shed some light on what might have caused this, what it means, and how it can be fixed.