8.5.4 Bulk Data Loading for InnoDB Tables

When importing data into InnoDB, turn off
autocommit mode, because it performs a log flush to disk for
every insert. To disable autocommit during your import
operation, surround it with
SET
autocommit and
COMMIT statements:

When performing bulk inserts, it is faster to insert rows in
PRIMARY KEY order.
InnoDB tables use a
clustered index,
which makes it relatively fast to use data in the order of
the PRIMARY KEY. Performing bulk inserts
in PRIMARY KEY order is particularly
important for tables that do not fit entirely within the
buffer pool.