database concurrency control with precision orthogonal
play

Database concurrency control with precision: orthogonal key-value - PowerPoint PPT Presentation

Database concurrency control with precision: orthogonal key-value locking Goetz Graefe Locks vs latches 2 Transaction isolation levels Snapshot isolation great for read-only transactions on multi-version storage 0. No locks no


  1. Database concurrency control with precision: orthogonal key-value locking Goetz Graefe

  2. Locks vs latches 2

  3. Transaction isolation levels Snapshot isolation – great for read-only transactions on multi-version storage 0. No locks – no concurrency control 1. Dirty read – only write locks, no locks for reads 2. Cursor stability – short read locks 3. Repeatable read – read locks on presence but not on absence 4. Serializable – “repeatable count” – locks on predicates or on gaps Simple and reliable transaction logic requires ___ . 3

  4. Example table + secondary index 4

  5. Example table + secondary index 5

  6. Orthogonal key-value locking Summary of possible lock scopes: 6

  7. Phantom protection Gerhard, Gottfried, Select count (*) where FirstName = ‘Harry’ Hank 7

  8. Equality queries Select count (*) where FirstName = ‘Jerry’ James Jim 8

  9. Range queries ...where FirstName between ‘Jerry’ and ‘Mary’ Irv Mohan 9

  10. Non-key updates ...where row# = 3 Non-key fields (“include” syntax), deletion (to ghost), insertion (from ghost) 10

  11. Phantom protection with a ghost Select count (*) where FirstName = ‘Harry’ 11

  12. 12

Recommend


More recommend