2 ms·
This is a misconception about how transactions are implemented by the database. Unlike php, a lot of modern databases implement transactions without locking out
by josephg 3y ago
This is a misconception about how transactions are implemented by the database. Unlike php, a lot of modern databases implement transactions without locking out other concurrent queries from being executed at the same time. In serializable (linearizable?) databases, everything happens as if the queries happened one at a time, but using magic tricks like MVCC they don’t need to lock the database to do it. It’s cool stuff! So long as your transactions are short lived it usually performs way better than you’d expect.
Modern databases are incredible feats of engineering.
- krackers 3y agoAlso optimistic locking