改变表的锁定粒度。
在实现具有高并发性要求的系统时,我们可以基于操作的要求采用更细粒度的锁定策略,从而减少资源争用。
In implementing systems with high concurrency requirements we can devise finer grained locking strategies based on the access requirements of the operations, hence reducing contention for resources.
例如,在财务系统中的客户级别上:一个粗粒度锁会锁定该客户的所有帐户,另一个锁则可锁定全部保险策略。
An example might be at the customer level in a financial system: one coarse grained lock could be to lock all accounts for the customer, another could be to lock all insurance policies.
应用推荐