Link to home
Start Free TrialLog in
Avatar of EVANFAGER
EVANFAGER

asked on

What cause a negative index size?

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.
ASKER CERTIFIED SOLUTION
Avatar of Aneesh
Aneesh
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of EVANFAGER
EVANFAGER

ASKER

Thanks to both of you. That did it. I split the points because the answers came in almost at the same time and both were correct. I gave more points to the first answer to come in.
hey.. Both came from me ...
oops, do you get all the points even though I split them?
yes , i got all the 1000 points.. Thanks
great, thanks a lot