At the end of each month, I have a procedures which copies all the data from one table to another - I am currently doing this by using the following:
DROP TABLE last_monthrecords
CREATE TABLE last_monthrecords
as select .... from this_monthrecords
It works but because of the number of records it is taking about 3 hours. February had 16 million records - and we do need to keep all of the data.
Is there a more efficient way I can copy this table?
DROP TABLE last_monthrecords
CREATE TABLE last_monthrecords
as select .... from this_monthrecords
It works but because of the number of records it is taking about 3 hours. February had 16 million records - and we do need to keep all of the data.
Is there a more efficient way I can copy this table?