Make the data migration faster

Speed up a painfully slow data migration.