Figure 1 shows the idea behind pessimistic locking.
图1展示了悲观锁定背后的思想。
Figure 1 illustrates the functioning of pessimistic locking.
图1阐释了悲观锁定的功效。
Fixed for UPDATE statements not generated for pessimistic locking.
修复了不会生成悲观锁定的FOR UPDATE语句。
Certain critical updates should always be done with pessimistic locking.
进行特定的关键性更新时,应始终使用悲观锁定方式。
The main problem with a pessimistic locking approach is that transactions have to wait for each other.
悲观锁定方法的主要问题是事务之间必须互相等待。
Lock the entire table before saving (pessimistic locking).
保存(悲观锁)之前锁定整个表。
The advantage of pessimistic locking is that it is guaranteed that changes are made consistently and safely.
悲观锁定的优点就是能够保证实现一致且安全的更改。
However, this should be evaluated on a case by case basis — there are situations where pessimistic locking is necessary.
但是,在实际使用中应根据具体情况进行分析,有时也需要悲观锁定方案。
A pessimistic locking strategy assumes that the probability is high that another user will try to modify the same row in a table that you are changing.
悲观锁定策略的前提是,另一个用户很可能试图修改您正在修改的某个表行。
In the pessimistic locking scheme, explicit locks are taken against rows using the SQL SELECT FOR UPDATE statement. Data is then modified, and an SQL UPDATE is issued.
在悲观锁定方案中,通过使用SQLSELECTFORupdate语句对数据行进行显式锁定,然后更改数据,并执行SQL UPDATE。
Pessimistic locking, where a record is locked while it is edited.
悲观的锁定,在编辑记录时将其锁定。
Avoid pessimistic Locking since the pessimistic locks affect the throughput and it's difficult to recover from bad locks.
应当尽量避免使用悲观锁,因为它会影响吞吐量,而且很难从坏锁(badlocks)中恢复。
Avoid pessimistic Locking since the pessimistic locks affect the throughput and it's difficult to recover from bad locks.
应当尽量避免使用悲观锁,因为它会影响吞吐量,而且很难从坏锁(badlocks)中恢复。
应用推荐