3 ms·
If I remember correctly, one of the ways around this is to do a no-op update before querying. So you'd update a field in the goal table to it's original value,
by emeraldd 14y ago
If I remember correctly, one of the ways around this is to do a no-op update before querying. So you'd update a field in the goal table to it's original value, which would cause the database to lock the table for the duration of the transaction.
Also, if I remember correctly, this is one of the things that can be solved with an MVCC aware engine.
http://en.wikipedia.org/wiki/Multiversion_concurrency_control http://en.wikipedia.org/wiki/Multiversion_concurrency_contro...
With MVCC a transaction should be aborted if another thread modifies the underlying data.