One INSERT per row takes minutes
Import a CSV file into MySQL or PostgreSQL in PHP, with upsert
Import a CSV file into a MySQL or PostgreSQL table in PHP, a hundred thousand rows in under three seconds, and update the rows that are already there with an upsert.
Read the guide100,000 rows into MySQL
264s 2.3s