Skip to content

Commit

Permalink
Merge pull request #4000 from szarnyasg/nits-20241030d
Browse files Browse the repository at this point in the history
Blog post: Replace images with PNG
  • Loading branch information
szarnyasg authored Oct 30, 2024
2 parents 72a7715 + 70be675 commit 17694e1
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 1,174 deletions.
12 changes: 6 additions & 6 deletions _posts/2024-10-30-analytics-optimized-concurrent-transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ DuckDB implements MVCC using a technique inspired by the paper [“Fast Serializ
UPDATE Accounts SET Balance = Balance + 5 WHERE Name = 'Sally';
```

<img src="/images/blog/mvcc/rowbasedmvcc.svg"
alt="Row-Based MVCC MVCC"
width=800
<img src="/images/blog/mvcc/rowbasedmvcc.png"
alt="Row-Based MVCC"
width="800"
/>

When reading a row, a transaction will first check if there is version information for that row. If there is none, which is the common case, the transaction can read the original data. If there is version information, the transaction has to compare the transaction number at the transaction's start time with those in the undo buffers and pick the right version to read.
Expand Down Expand Up @@ -66,9 +66,9 @@ In order to address these issues - DuckDB instead stores **bulk version informat
UPDATE Accounts SET Balance = Balance + Balance / 5;
```

<img src="/images/blog/mvcc/columnbasedmvcc.svg"
alt="Column-Based MVCC MVCC"
width=800
<img src="/images/blog/mvcc/columnbasedmvcc.png"
alt="Column-Based MVCC"
width="800"
/>

One beautiful aspect of this undo buffer scheme is that it is largely performance-transparent: if no changes are made, there are no extra computational cost associated with providing support for transactions. To the best of our knowledge, DuckDB is the *only transactional data management system that is optimized for bulk changes to data* that are common in analytical use cases. But even with changes present, our transaction scheme is very fast for the kind of transactions that we expect for analytical use cases.
Expand Down
Binary file added images/blog/mvcc/columnbasedmvcc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 17694e1

Please sign in to comment.