There are situations when you need to separate processing of big amount of data between several “agents”, e.g.:
In this article you will see how to solve this task using agents.
If you are interested in how to create fast MySQL queries, this article is for you
INSERTs in one long INSERT with multiple VALUES lists to insert several rows at a time: quiry will be quicker due to fact that connection + sending + parsing a query takes 5-7 times of actual data insertion (depending on row size). If that is not possible, use START TRANSACTION and COMMIT, if your database is InnoDB, otherwise use LOCK TABLES — this benefits performance because the index buffer is flushed to disk only once, after all INSERT statements have completed; in this case unlock your tables each 1000 rows or so to allow other threads access to the table.This article was written by Alexander Skakunov, author of I want to be free blog, certified MySQL developer.