Re: MySQL Parallel Inserts

2010-12-21 Thread 杨涛涛
Hi.
   MySQL do the sql parse in the single way, just one thread. So if there
are parallel insert statement, it will not faster than before.
David Yeung, In China, Beijing.
My First Blog:http://yueliangdao0608.cublog.cn
My Second Blog:http://yueliangdao0608.blog.51cto.com


2010/12/17 Andy listan...@gmail.com

 Shawn/Krishna,

 Thank you. I will try this.

 -Andy


 On Tue, Dec 14, 2010 at 8:13 AM, Krishna Chandra Prajapati 
 prajapat...@gmail.com wrote:

  Hi Andy,
 
  I agree, prefer LOAD DATA INFILE... command for bulk loading. It is 30%
  faster than normal inserts.
 
  Krishna
 
 
  On Tue, Dec 14, 2010 at 8:02 AM, Andy listan...@gmail.com 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
 
 
 



Re: MySQL Parallel Inserts

2010-12-16 Thread Andy
Shawn/Krishna,

Thank you. I will try this.

-Andy


On Tue, Dec 14, 2010 at 8:13 AM, Krishna Chandra Prajapati 
prajapat...@gmail.com wrote:

 Hi Andy,

 I agree, prefer LOAD DATA INFILE... command for bulk loading. It is 30%
 faster than normal inserts.

 Krishna


 On Tue, Dec 14, 2010 at 8:02 AM, Andy listan...@gmail.com 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





Re: MySQL Parallel Inserts

2010-12-14 Thread Krishna Chandra Prajapati
Hi Andy,

I agree, prefer LOAD DATA INFILE... command for bulk loading. It is 30%
faster than normal inserts.

Krishna

On Tue, Dec 14, 2010 at 8:02 AM, Andy listan...@gmail.com 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



MySQL Parallel Inserts

2010-12-13 Thread Andy
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


Re: MySQL Parallel Inserts

2010-12-13 Thread Shawn Green (MySQL)

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