Optimistic concurrency internals
Download
1 / 7

Optimistic Concurrency Internals - PowerPoint PPT Presentation


  • 138 Views
  • Uploaded on

Optimistic Concurrency Internals. James Rowland-Jones @ jrowlandjones. What we will cover in the next hour. Concurrency Basics Flavours of Optimistic Concurrency The Internals. “the ability of multiple processes to act on the same data at the same time”. Concurrency.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Optimistic Concurrency Internals' - gibson


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Optimistic concurrency internals

Optimistic Concurrency Internals

James Rowland-Jones

@jrowlandjones


What we will cover in the next hour
What we will cover in the next hour

  • Concurrency Basics

  • Flavours of Optimistic Concurrency

  • The Internals


Concurrency

“the ability of multiple processes to act on the same data at the same time”

Concurrency


Read committed snapshot isolation
Read Committed Snapshot Isolation

  • Essentially same isolation level as Read Committed in Pessimistic Mode

  • No shared locks when reading data

  • Once set - default transaction isolation level for that SQL Server database.

  • The data that the user can read is the data provided at the time the statement inside the transaction starts.


Snapshot isolation
Snapshot Isolation

  • Completely New Isolation Level

  • Designed for Higher degrees of Isolation level than RCSI

  • Not Good if concurrent Updates are occurring

  • Fair number of restrictions


Row versioning
Row Versioning

  • Used to implement

    • Online Index Rebuilds

    • Triggers (inserted and deleted tables use row versioning)

    • MARS

  • Prior to updating a row SQL Server copies the row and stores it in the version store

    • Held till no longer required

    • Marked by the Transaction ID of the row that caused its creation

    • Writers bear the brunt of the cost for setting up the version

    • Readers pay navigating pointer chains

  • BLOBs aren’t moved into the version store in their entirety

    • Only fragment that was changed is held.


ad