Question : SQL 2005 - Partitioned Table Refresh

Hi, I have a very large table that we have partitioned by fiscal year.  Every day, in production, this table gets inserts with new data for the current fiscal period.  

My question is:  I am trying to refresh our development enviornment with current data from production.  I'm wondering how do I go about refreshing the development table when its partitioned?  I only want to bring over the current fiscal period but there is already current fiscal period data in the development table.

Do I just do a delete from {table} where fiscal year = 2010 and then do an insert from the other table where fiscal year = 2010?  Or is there a more efficient and faster way to do this?

The current fiscal period has about 30 million records in it.  I kicked off the delete statement in development about 18 minutes ago and its still running.  I was thinking it would be faster because of the partitioning...

I am new to table partitioning so forgive my ignorance.  Thanks. :)

Answer : SQL 2005 - Partitioned Table Refresh

Do data copy using BIDS using data flow task and limiting the  to 100000 batches on destination flow task. Keeps transaction log small. Speed wil depend upon indexes on target table but I coped small table using this method for 50million records in approx 2 minutes. You are copy data in one transaction that you describe which will fill up transaction log quickly. If you cancel it then it will rollback and will take take time also to complete
Random Solutions  
 
programming4us programming4us