Well, IMHO,
Every time you perform an insert operation, mysql has to adjust the index to cope with the new value. the table copy operation performs the insert as a single transaction, and then does a single re-index at the end.
You can achieve the same result by doing a multiple insert.
insert into table (f1,f2,f3) values (v1,v2,v3),(x1,x2,x3),(y1,y2,y3)
You can also use alter table tablename disable keys before the bulk insert, and alter table tablename enable keys once it is done.
Speed improvements will depend on what fields you have indexed.
|