Make sure to have commits in between like every 10000 rows.