Bug #25120 that's right?
Submitted: 17 Dec 2006 17:51 Modified: 29 Mar 2011 18:45
Reporter: Roberto Spadim (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S5 (Performance)
Version:5.1.10 OS:Linux (linux)
Assigned to: CPU Architecture:Any
Tags: update set

[17 Dec 2006 17:51] Roberto Spadim
Description:
hello i'm using UPDATE syntax but i think that using column=another_column is slower than just using column=constant_value
see:

UPDATE table set field=field+1 where primary_key=1
i get 0.1 seconds from PHP mysql_query

UPDATE table set field=<HERE I PUT THE field+1 GETTING FROM APPLICATION VARIABLES>
where primary_key=1
i get 0.001 seconds from PHP mysql_query

that's right or my application maybe with another overload (just tell if update is slower with column=not_constant_value)

How to repeat:
create an table, set field=0
make a loop and get time to execute
using update field=field+1
using update filed=<field+1 value in app>

Suggested fix:
i don't know if an read and after a write is the main problem here, 
i'm using ENGINE=MEMORY
[18 Dec 2006 22:04] Valeriy Kravchuk
Thank you for a problem report. Please, try to repeat with a newer version, 5.1.14, and, in case of the same results, send a complete test case, with CREATE TABLE, all the data and exact (PHP?) code that demonstates the problem.
[19 Jan 2007 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[29 Mar 2011 18:45] Roberto Spadim
no problem with version 5.5, closed