Since you have a temp table created (no keys I assume), use the command

 mysqldump -v -e -n -t dbname tablename > filename.sql

This should create insert statements with many values in a single
insert. Then use the client program to insert them to you db.

 mysql -u matt -p dbname < filename.sql

This is very fast way to insert rows. Speeds up insertion by at
least 10x on my large tables (11 million rows). I noticed someone
with 1000x more rows w/o problems.

BTW, by forcing the table to have packed keys, the docs say it
will slow your insertion. Maybe not that much, i don't know.

David





Isnt the text file it creates, going to insert the records back into the temp table when I load it back in?


Does this do insert ignore or insert replace? I need to control that, on some tables I do insert ignore, on others i do insert replace.

Almost all of the speed issue is read related, the disk writes are nearly 0, the reads are as fast as the drive can run, reading to see if the record violates the primary key I assume

about 3 gig seems to be the magic number, less than that is lightning fast, more than that is extreemly slow








-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to