Page 1 of 1

Execute one MYSQL database from different pc’s

Posted: Sun Dec 03, 2006 1:46 pm
by david12
We have build a program in php on an mysql database. It work’s fine but it is extremely slow. The reason for this is that on all the records in the database PHP is doing a calculation which is taking approx 1 sec per record. The database has more then 1 mio records so a long time to do a run over the complete database.

We would like to streamline this by putting other pc’s in a network. The idea is to have several pc’s execute a part of the records.

For example pc 1 is doing the calculations on record 1 until 100.000 and saves the result in the central mysql database. Pc 2 is doing the calculation from record 100.001 untill record 200.000. end so on.

In this way if we put 10 pc’s in parallel our calculation could go about 10 times faster.?

Is this possible and is PHP- mysql the right code?

Thx for help


David

Posted: Sun Dec 03, 2006 2:19 pm
by RobertGonzalez
Can't MySQL handle the calculations? Have you tried this yet? Also, have you optimized the tables and assigned indexes as necessary?

Posted: Sun Dec 03, 2006 5:03 pm
by nickvd
Post your code/database/example calculation. We may be able to optimize it... i can't think of any calculation that would take a full second to process...