On 12/13/2010 21:32, Andy wrote:
Greetings everyone.

I am in a situation where I need to do parallel inserts into MySQL database
from inside my Perl program. Basically, I have several million records to
insert into the database, and hence I would rather do them in parallel than
doing them one at a time. I looked around but did not find any information
on doing this. Does MySQL not support parallel reads/writes?

Thanks in advance.

Andy


Actually, you would be better off using the LOAD DATA INFILE... command for your bulk loading needs. The more contention you create for the same data and the more times you force an index rebuild, the slower it will move. Single-threaded, bulk loading is what works best for MySQL.

Some light reading to help you along:
http://dev.mysql.com/doc/refman/5.1/en/load-data.html
http://dev.mysql.com/doc/refman/5.1/en/non-select-optimization.html
http://dev.mysql.com/doc/refman/5.1/en/csv-storage-engine.html

--
Shawn Green
MySQL Principal Technical Support Engineer
Oracle USA, Inc.
Office: Blountville, TN

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to