PR

2010-12-13 Thread Sergey Lazurenko


Hello! I'll be gratefull if you'll place our news on your page.

Best Regards,
Sergey Lazurenko

dotConnects 6.00.odt
Description: application/vnd.oasis.opendocument.text

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

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



Database procedures

2010-12-13 Thread Machiel Richards
HI All

I am hoping that someone with more experience than me can assist
here.

I am trying to find out how to write a database procedure within
MySQL, however I have never worked with procedures in my life and the
resources I found on the net thus far seems greek to me...


What we are trying to achieve is the following:

There are currently 2 specific tables which contains
archived data which are being deleted manually each day.

  We would like to put the delete of the data within
a procedure and then have an automated process to execute the procedure.


What we are using currently is the following:

1.  = select max(id) from table_1
where utc  Date;
2. delete from table_2 where id  ;
3. delete from table_1 where id  ;

basically we currently delete everything
older than the start of yesterday but this might be changin at some
point to be done hourly as the system grows.


Does anybody have a good resource which explains
exactly how I would be able to create this procedure or can otherwise
assist or guide me?

I would really appreciate the help as I would
love to learn how to write procedures.

Regards
Machiel