|
|||||||||||
|
Re: multiple current_timestamp
From: Tobias Asplund <tobias(at)mysql.com>
Date: Sun Jul 29 2007 - 23:43:20 EDT
> I don't know if there is a strong technical reason for only allowing > a single timestamp field to be automatically set or automatically updated, > or the limitation was just a carry-over from when only the first timestamp
> the same effect with
> a trigger, it may not
> have a shot.)
The effect can be the same, but the performance is far from there in a trigger
implementation.
We tested: 1. Letting the timestamp take the value automatically 2. Having a BEFORE INSERT trigger set the column value into a DATETIME column 3. Forcing the function NOW() into a DATETIME column http://www.flupps.org/pics/timestamp_benchmark.015.jpg We found that if you use NEW. or OLD. in a trigger a second pass of "Opening tables" is executed, the high concurrency to the table_cache slowed it down a bit in this case (at least, that's what we could see from limited testing under time strain). -- Tobias "flupps" AsplundReceived on Sun Jul 29 23:43:37 2007 This archive was generated by hypermail 2.1.8 : Thu Aug 09 2007 - 19:06:22 EDT |
||||||||||
|
|||||||||||