I have a large table which has a ton of unused space. I updated the table recently and NULLed out a varbinary (max)
column that we didn't need. This has created a lot of unused space:
EXEC sp_spaceused N'dbo.ClientHistory';
The table only has a single clustered primary key index. I tried rebuilding it, but it didn't help.
ALTER INDEX PK_ClientHistory ON dbo.ClientHistory
REBUILD WITH (FILLFACTOR = 95, SORT_IN_TEMPDB = ON);
I also tried updating statistics, which also didn't help.
UPDATE STATISTICS dbo.ClientHistory WITH FULLSCAN;
I've tried shrinking the database, which didn't help either.
DBCC SHRINKFILE (N'mydb_Data' , 0, TRUNCATEONLY)
The unused percentage remains at about 50%. What else can I try short of copying data into another table and then doing the renaming dance.