INSERT and UPDATE are getting slower as the number of rows increases in the indexed table. Innodb tables are even slower than insert MyISAM tables, and the write delay option is not available.
The most effective way to speed things up is to first save the data to a flat file and then do LOAD DATA , which is about 20 times faster.
The second option is to create a temporary memory table, load data into it, and then make INSERT INTO SELECT in batches. This is when you have about 100 rows in your table pace, load them into a constant.
In addition, you can get a slight speed improvement by moving the index file to a separate physical hard drive from where the data file is stored. Also try moving any log logs to another device. The same applies to the temporary location of the file.
source share