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
 General SQL Server Forums
 New to SQL Server Programming
 Question about Compression

Author  Topic 

Bjcascone
Starting Member

37 Posts

Posted - 2011-02-24 : 12:33:20
I have a table that I am compressing and then shrinking and it currently takes more than 20 days to complete these 2 processes. I am looking for a way to save some time and still save the over 300 GB i am saving by having these tables compressed.

My first idea is to do an insert into (with TablockX and minimal logging) a empty existing table in a new DB (this new table and DB would have to have compression turned on) that brings me to my first question how do i turn page compression on a new table so that the insert will be done with the compression on? is that even possible.

Also if anyone has any other ideas on how i can save some time and space please let me know.

Hightlights:

12 DB's avg(400 GB, 250 - 500 mil records each)
4 tables in each DB
once compressed no data is being inserted or changed
no clustered indexes on tables
current process -
compression -takes 15 hours
Shrink - takes 22 days
Space savings Post compression and shrink the avg DB size is 100 gb.

Thanks in advance for your help!
-Brian

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-02-24 : 12:57:12
How are you performing the shrink? In small batches of say 500MB at a time? Or one large shrink?

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

Subscribe to my blog
Go to Top of Page

Bjcascone
Starting Member

37 Posts

Posted - 2011-02-24 : 13:46:55
The shrink is divided up by Files and the files are a max of 3750 MB
Go to Top of Page

Bjcascone
Starting Member

37 Posts

Posted - 2011-03-01 : 16:19:37
as a follow up I was able to insert the uncompressed data into compressed tables in a new DB and this process took considerably less time (1 day VS 22) by using Tablock and turning the trace 610 flag on the insert into was very fast.

Go to Top of Page
   

- Advertisement -