On my original select, the row will have migrated = false. Maybe All I need to put is a limit 2000 and the query will do the rest?
You shoud try to avoid the for loop, but yes a limit 2000 on the for loop query should work since the migrated flag will ensure the same rows aren't selected again.
David J.