XP is just a number | |
PerlMonks |
Re^2: DBI: speed up insertions in generating databaseby hakkr (Chaplain) |
on Dec 04, 2004 at 16:45 UTC ( [id://412419]=note: print w/replies, xml ) | Need Help?? |
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.. 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
In Section
Seekers of Perl Wisdom
|
|