Tony Saro
Tony Saro
  • 30
  • 277 092
The Most Complicated Algorithm I've Ever Written: SQLite B-Tree Balancing
In this video we visualize how the SQLite 2.X.X B-Tree balancing algorithm works. Technically it's not exactly the algorithm from SQLite but my own version which I implemented for MKDB. My version is almost a 1:1 Rust copy of the original algorithm implemented in C which you can find linked below.
🌐 LINKS
Algorithm Implementation:
github.com/antoniosarosi/mkdb/blob/bf1341bc4da70971fc6c340f3a5e9c6bbc55da37/src/storage/btree.rs#L1627
Original SQLite Implementation:
github.com/antoniosarosi/sqlite2-btree-visualizer/blob/e6d1786a878e0497289d208f7302802b6bd4a9a1/src/btree.c#L2171
✉️ CONTACT INFO
Business Email: business@antoniosarosi.io
Contact Email: sarosiantonio@gmail.com
Twitter: antoniosarosi
Instagram: antoniosarosi
LinkedIn: www.linkedin.com/in/antoniosarosi/
🎵 MUSIC
czcams.com/video/oCEcHE_jWfI/video.html
czcams.com/video/a7NaCCQEdE0/video.html
czcams.com/video/AgzKnzmZ1z8/video.html
📖 CHAPTERS
00:00 Introduction
00:41 Databases & B-Trees
03:30 The Balancing Algorithm
09:24 Deleting & Balancing
12:03 Final Thoughts
🏷️ HASHTAGS
#programming
#computerscience
#algorithm
zhlédnutí: 25 366

Video

The ORDER BY Algorithm Is Harder Than You Think
zhlédnutí 54KPřed měsícem
In this video I describe in detail how my implementation of the K-Way External Merge Sort algorithm works. K-Way External Merge Sort is an algorithm used to sort large datasets that don't fit in main memory (usually RAM). Therefore, this algorithm is used by databases like Postgres to process ORDER BY queries when tables don't fit in memory. The algorithm consists of a series of "passes" throug...
Writing My Own Database From Scratch
zhlédnutí 174KPřed 2 měsíci
Writing My Own Database From Scratch