Hi Guys,
not sure if this is the ideal forum for my problem, but I have a question on order of execution of mysql queries. In particular, if the the same query was executed twice, on a mysql server that was under strain, at precisely the same moment, and both queries were to update the value of a column using "column = column + 500", what would the end result be?
Ideally, I would like the value to be incremented for each and every query, however I'm finding that, occasionally, when the two separate queries execute at precisely the same moment, the end result is + 500 rather than the + 1000 I was expecting (500 for each query).
I suspect using transactions may be a way around this. However, if each query is executed by a different user, are transactions relevant?
We're using both InnoDB and MyISAM storage engines,, on diff machines, version 5.
not sure if this is the ideal forum for my problem, but I have a question on order of execution of mysql queries. In particular, if the the same query was executed twice, on a mysql server that was under strain, at precisely the same moment, and both queries were to update the value of a column using "column = column + 500", what would the end result be?
Ideally, I would like the value to be incremented for each and every query, however I'm finding that, occasionally, when the two separate queries execute at precisely the same moment, the end result is + 500 rather than the + 1000 I was expecting (500 for each query).
I suspect using transactions may be a way around this. However, if each query is executed by a different user, are transactions relevant?
We're using both InnoDB and MyISAM storage engines,, on diff machines, version 5.