This model improves both the write performance as well as the read performance across an increasing number of slaves.This scale-out solution that I have discussed above is actually master-slave replication, and this is the kind of replication that we will be setting up today.With scale-out solution we are basically spreading the load among multiple slaves to improve performance.In this solution, all writes and updates take place on the master server, while reads take place on one or more slaves.This frees you to perform line-by-line updates (as you currently do), but with autocommit or more reasonable transaction batches.
Without this privilege, the slave cannot request updates that have been made to databases on the master server. Thanks Bill, it has been too long since I have worked with My SQL, I remembered that I had issues with REPLACE, but I forgot what they were. INSERT INTO Users( weight, desired Weight ) VALUES ( 160, 145 ) WHERE id = 1; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your My SQL server version for the right syntax to use near 'WHERE id = 1' at line 1 You Should not use where condition in Insert statement. But, when id is a primary key & auto increment key then the above INSERT statement is not work. ON DUPLICATE KEY syntax EDIT I think that Bill Karwin's point is important enough to pull up out of the comments and make it very obvious. It does a DELETE (which may be a no-op if the row does not exist), followed by an INSERT. And use one of the Hash Crypt algorithms to store the password. For example, if you had a table named clients with a primary key of client_id, you could use the following statement: INSERT INTO clients (client_id, client_name, client_type) SELECT supplier_id, supplier_name, 'advertising' FROM suppliers WHERE not exists (select * from clients where clients.client_id = suppliers.supplier_id); create temporary table xtable ( weight int(11), desired Weight int(11) ; insert into xtable (weight, desired Weight) select weight, desired Weight from Users where [condition] insert into Users (weight, desired Weight) select weight , desired Weight from xtable; clause you put a condition, and it is used for either fetching data or for updating a row. It does a DELETE (which may be a no-op if the row does not exist), followed by an INSERT. You can make sure that you do not insert duplicate information by using the EXISTS condition.