in reply to Re: DBI: speed up insertions in generating database
in thread DBI: speed up insertions in generating database
Yep defo write out a csv file and then use mysqlimport or a 'Load data infile' statement for each table. If you do stick with DBI Inserts maybe try the inserts with multiple VALUES lists
From the mysql docs..INSERT INTO $table (field1,field2) VALUES (value1,value2),(values3,val +ues4);
When loading a table from a text file, use LOAD DATA INFILE. This is usually 20 times faster than using a lot of INSERT statements. See section 13.1.5 LOAD DATA INFILE Syntax.
mysqlmonks.org
|
|---|