If your log IO subsystem allows it, then: INSERT INTO target(field1, field2, field3)SELECT field1, field2, field3 FROM source;But having the entire transfer occur in one single statement means one single transaction, which means that x2.5 data size log has to be generated and kept during the entire statement. If you transfer 50Gb, your target db log will grow to 250Gb (even if the recovery mode is set to simple!).If you are concerned about log, then you have to transfer in batches. You can still do the INSERT. SELECT trick, but your SELECT has to use some key range and batch acceptable number of rows.Ultimately, you can always do a followed by a, it will work pretty fast and is probably the fastest way to get a reliable transfer going.
How to copy a row and insert in same table with a autoincrement field in MySQL? Ask Question Asked 7 years. You're married to that database now and just adds to the costs whenever you want to change. – Yzmir Ramirez Feb 13 '12 at 2:41. The best seems to use sql statements only to copy that row, while at the same time only.