[–] XCSme 11mo ago ↗ A client asked me to help them import MySQL analytics data over to a DB that already had data in it.The main problem with a direct import is that most rows in MySQL have an auto-incrementing ID, so old data will have ID conflicts with the new data.The solution I found was to add a large value (e.g. 10 million) to the rows in the new data, before importing the old one.Is there a better solution for such cases?
1 comment
[ 0.17 ms ] story [ 15.3 ms ] threadThe main problem with a direct import is that most rows in MySQL have an auto-incrementing ID, so old data will have ID conflicts with the new data.
The solution I found was to add a large value (e.g. 10 million) to the rows in the new data, before importing the old one.
Is there a better solution for such cases?