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

database concurrency control with precision orthogonal
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

Database concurrency control with precision:

  • rthogonal key-value locking

Goetz Graefe

slide-2
SLIDE 2

Locks vs latches

2

slide-3
SLIDE 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

slide-4
SLIDE 4

Example table + secondary index

4

slide-5
SLIDE 5

Example table + secondary index

5

slide-6
SLIDE 6

Orthogonal key-value locking

Summary of possible lock scopes:

6

slide-7
SLIDE 7

Phantom protection

Select count (*) where FirstName = ‘Harry’

7

Gerhard, Gottfried, Hank

slide-8
SLIDE 8

Equality queries

Select count (*) where FirstName = ‘Jerry’

8

James Jim

slide-9
SLIDE 9

Range queries

...where FirstName between ‘Jerry’ and ‘Mary’

9

Irv Mohan

slide-10
SLIDE 10

Non-key updates

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

10

slide-11
SLIDE 11

Phantom protection with a ghost

Select count (*) where FirstName = ‘Harry’

11

slide-12
SLIDE 12

12