February 5, 2008 at 1:47 pm
Hello,
I have a question about space used by a table index.
The result returned by sp_spaceused is twice the value of that computed from the sysindexes table using the (used column).
Why this discrepancy? And how can it be synchronized?
Thanks
February 5, 2008 at 11:35 pm
Spaceused can get out of sync with reality, especially on SQL 2000. I've had it reporting negative space used on a table.
Run DBCC updateusage on that index and see if it fixes the problem.
Syntax
DBCC UPDATEUSAGE
( { 'database_name' | 0 }
[ , { 'table_name' | 'view_name' }
[ , { index_id | 'index_name' } ] ]
)
[ WITH [ COUNT_ROWS ] [ , NO_INFOMSGS ]
]
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply