You are viewing a single comment's thread from:
RE: Database Challenge: Simultaneous Update of the Same Value
Here are a few tips on how to effectively handle concurrent updates:
- Transactions are not supported by all database types. Although MyISAM is still supported, it is not MySQL's default database engine.
- Due to circumstances beyond your control, transactions may not proceed. If this happens, you'll need to be ready to re-enter your application's BEGIN WORK code.
- Otherwise, the first select can read data that other transactions have not yet committed (transactions aren't like mutexes in programming languages).
- If there are concurrent ongoing SERIALIZABLE transactions, some databases will throw an error, and you will have to restart the transaction.
- SELECT.. FOR UPDATE locks the rows retrieved by select until the end of the transaction in some databases.
To deal with concurrent updates easier, you can use these helpful SQL Tools.