Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Free Disk Space by Clearing Columns ? Expand / Collapse
Author
Message
Posted Tuesday, November 26, 2013 10:01 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 8:15 PM
Points: 2,832, Visits: 8,508
I have a huge archive table in a lightly used archive database. We really don't need all the data in each row, and I was considering updating a lot of columns to NULL. Will that free up space for reuse, either with or without shrinking the database file ? I don't want to actually drop the unneeded columns because I might break applications that populate & use the table, but I would like to reclaim space.

(SQL 2008 R0, std ed.)



Post #1517750
Posted Tuesday, November 26, 2013 11:19 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 4:08 PM
Points: 40,177, Visits: 36,580
You'll definitely need to rebuild the clustered index to release the free space into the data file for reuse by other tables, may need to run DBCC CleanTable as well


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1517772
Posted Tuesday, November 26, 2013 9:11 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 12:08 AM
Points: 35,366, Visits: 31,901
I also believe that type of thing will only work on variable length columns, as well.

--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1517887
Posted Wednesday, November 27, 2013 12:47 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: 2 days ago @ 9:46 AM
Points: 282, Visits: 889
You might want to consider table/index compression.

Edit: Sorry did not notice it was standard edition. Data compression not available
Post #1518186
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse