Optimizing migrate.