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 2005 Forums
 Transact-SQL (2005)
 Table Size Reduction/Update

Author  Topic 

qman
Constraint Violating Yak Guru

442 Posts

Posted - 2009-09-29 : 13:27:30
I have a table that was created using a TSQL's bulk insert statement.
The table was created without any issues and its size is 350MB (which appears to have been defined automatically when the table was created.).

I then dropped 10 columns from the table using Alter Table/Drop Column.

I notice that the size of the table is still at 350MB and did not decrease with the elimination of these 10 columns.

Is there anything I can do to "reduce" the overall size of the table now that 10 columns have been deleted?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-09-29 : 13:43:12
try running DBCC CLEANTABLE and DBCC DBREINDEX.
Go to Top of Page

Zim327
Yak Posting Veteran

62 Posts

Posted - 2009-09-29 : 13:44:20
I'm actually investigating this right now.
I've never tried this yet but I found this:
DBCC CLEANTABLE
read about it here:
[url]http://msdn.microsoft.com/en-us/library/ms174418.aspx[/url]

I hope this helps,
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-09-29 : 13:50:07
quote:
Originally posted by Zim327

I'm actually investigating this right now.
I've never tried this yet but I found this:
DBCC CLEANTABLE
read about it here:
[url]http://msdn.microsoft.com/en-us/library/ms174418.aspx[/url]

I hope this helps,


Go to Top of Page

qman
Constraint Violating Yak Guru

442 Posts

Posted - 2009-09-29 : 13:56:15
Thanks guys, I will have a look....
Go to Top of Page
   

- Advertisement -