4 ms·
You know what I would like to see (for learning)? A simplified project how indices, for example in b-tree, are stored in segment files.
by didip 5y ago
You know what I would like to see (for learning)?
A simplified project how indices, for example in b-tree, are stored in segment files.
- xtracto 5y agoThis. I was hopeful that the linked article would explain how b-trees are practically used for indexes in DB engines. I already know what a db index is (databases 101 software eng) and why are they used, but would love a clear explanation of how are they implemented
- btilly 5y agohttps://perl.plover.com/BTree/article.html https://perl.plover.com/BTree/article.html is an introductory article about how a b-tree is implemented. It has example code for it in Perl. It doesn't actually match low level implementations for a number of reasons. Such as the need to fix the page size the block fits in rather than the count of things in the block, and locking for concurrent access. But the data structure itself still looks the same.