Locking Granularity
Granularity - size of data items to lock
- e.g., files, pages, records, fields
Coarse granularity implies
- very few locks, so little locking overhead
- must lock large chunks of data, so high chance of conflict, so concurrency may be low
Fine granularity implies
- many locks, so high locking overhead
- locking conflict occurs only when two transactions try to access the exact same data concurrently
High performance TP requires record locking