The following query produces a very slow running failure. (Usually time out).
I am not sure about the syntax. Any ideas?
- UPDATE `table1`,`table2`,`table3` SET [all fields in all three tables to values]
-
WHERE `tables1`.`id` = '20439'
The EXPLAIN syntax should help you out here.
What is happening is that you are doing a 3 table join, without realizing it. You are updating tables 2 and 3 without any restrictions; all entries in these two tables are updates all the time.
In order to see what exactly you are updating, do a select on the same set:
-
SELECT * FROM `table1`,`table2`,`table3`
-
WHERE `tables1`.`id` = '20439'
-
Another thing causing a problem is that you have a string as your ID. If that really is an integer in your table, you don't need the '' around it.