backing up data (merged 3) [message #399138] |
Mon, 20 April 2009 21:05  |
swas_fly
Messages: 220 Registered: March 2008 Location: Bhubaneswar
|
Senior Member |
|
|
I have 2 tables
a_list and b_list_statis
The list_status has a date filed but a_list has no date field.
the common column between both the tables is the ID field.
now i need to write a process that will run weekly and keep only 30 days of data in a_list and move all data to a history table --a_history.
I am trying to follow the below process?is it fine
a_list contains 5.6 million data
step1
move data from a_list toa_bkp
(to create a_bkp will only 30 dys of data matching on the id field among both tables a_list and b_list_statis)
step2
move rest data to a_history(what is the best way to do so)insert?or any other way?
step 3
drop a_list
step4
rename a_history to a_list
this process is to run weekly?
please advice
|
|
|
|
|
Re: backing up data (merged 3) [message #399377 is a reply to message #399165] |
Tue, 21 April 2009 21:42   |
swas_fly
Messages: 220 Registered: March 2008 Location: Bhubaneswar
|
Senior Member |
|
|
Hi
The technical assurance team had asked us to add a date field on the table a_list and make the table a range partition on week basis so that 4 weeks of data will be stored in a_list and every week when the job will run it will move one weekly partition data from a_list to the a_history table partition.
hence please advice how to use the partition here
as this is a new thing for me
|
|
|
|