I have a table with around 6,000,000 records. It is backed up every few hours. Recently a script ran that cascade updated about 2,000,000 of the older records to bad values. I have extracted those 2,000,000 records from the backup and have them ready for re-insert, in the form of "INSERT INTO table (col, col) values (val, val)"
Now, I need a mechanism to insert those 2,000,000 records, replacing the bad data with the historical data, while maintaining existing IDs (meaning REPLACE is not an option -- as it deletes on duplicate and increments the ID). Also, I need to do this without interrupting server access for too long (which means DROP TABLE, then --force trickery is not an option).
I'm sure I'm missing something, but I can't figure out for the life of me how to replace in-place within the current parameters. Thoughts?