http://www.perlmonks.org?node_id=709246


in reply to Re^2: When to use forks, when to use threads ...?
in thread When to use forks, when to use threads ...?

If you're using MySQL, the fastest approach is to load the data in a temporary table and then use an INSERT... ON DUPLICATE UPDATE statement to copy it all into the existing table in one shot.