Hi, peeps, I hope this problem is usual and have been encountered by many. basically, what i need to do is create a new unique field in a large table with 720 million records. Basically this is the direct approach.

create new table temptable sameas mytab + new serial field;

insert into temptable
select 0, mytab.* from mytab order by insert_datetime;

alter table temptable modify (serial_field decimal(14,0));

drop table mytab;

rename table temptable to mytab;
this is what i'm thinking to do, but then again, with 720 million data, that will run for days or maybe run out of memory, especially that order by clause is in there. so can you guys suggest a diff. and better approach? a way to cut the time this migration will run? thanks