Data Archive

  • We have to archive 5000K rows.

    1. Insert from MainTable to ArchiveTable and then delete those data from MainTable

    ( Of course will do this in batches)

    2. Delete the data from MainTable and create trigger on it to insert into ArchiveTable from deleted.

    Which method is good?

  • Is this a live production database. If so, dont use a Trigger as this could have potential performance problems. Have you thought about using SSIS?

    There are many ways to do this. If it is based on date you can just do a Select * into Archive table from Current table where daterange>'' and daterange<''.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply