Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 reclaiming space used by dropped spatial index?

Author  Topic 

Ben Taylor
Starting Member

6 Posts

Posted - 2011-02-08 : 04:37:40
It appears to me that SQL server can't reclaim space used by a geography column with a spatial index on it.
I had a table that took up about 1GB, and added a geography column onto it, updated it, and built a spatial index on that column.
After I'd dropped it, and the column, and done dbcc cleantable on the table and dbcc cleantable on the database, the table wouldn't go down below 5GB. Until I did
select * into MyTable2 from MyTable
sp_rename 'MyTable2', 'MyTable'
when it was down to 1GB again.

Why can't it reclaim this space itself?
Any ideas?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-02-08 : 12:41:31
You likely had fragmentation and just needed to run ALTER INDEX REBUILD on it.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -