3 ms·
All about Two-Phase Locking and a little bit MVCC
- shin_lao 14y agoThis is an extremely confusing explanation of MVCC an 2PL. MVCC is about keeping all the versions of an entry and associating an unique timestamp with each entry. Its advantages are scalability, no deadlock and simplicity. Its drawbacks are increased memory consumption, the requirement that all nodes must be synchronized and that all elementary operations must be atomic. 2PL is a straightforward albeit pessimistic approach. Lock access to your data, make your modification, and then release. Its advantages are reliability and tight memory consumption. Its drawbacks are the lack of scalability and potential deadlocks.
- jstclair 14y agoSlight correction: Microsoft SQL Server added MVCC in 2005 (READ_COMMITTED_SNAPSHOT).