O'Reilly logo

Transaction Processing by Andreas Reuter, Jim Gray

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

7.8 Granular Locks

Phantoms raise the issue of defining the lock unit, the data aggregates that are locked to insure isolation. Candidate units are databases, files, file subsets, records, fields within records, and so on. The choice of lock granule presents a trade-off between concurrency and overhead. On the one hand, concurrency is maximized by a fine locking granule (such as a record). Record locking is good for many small transactions running in parallel. On the other hand, a small locking granule is costly for a complex transaction that accesses a large number of granules. The large transaction would have to acquire and maintain a lock on each granule. A coarse locking granule, such as a file, is convenient for complex transactions. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required