|
|
|
|
|
by Capricorn2481
635 days ago
|
|
> will be updated into into a single-file b-tree structure I'm not knowledgeable on this, but my understanding was a b-tree is a way of sorting values that could be ordered in a certain way. Like this would be a b-tree of IDs ``` [8]
/ \
[3, 5] [10, 12]
/ | \ / | \
[1] [4] [6,7] [9] [11, 13]
```You traverse by comparing your needle to the root node and going left or right depending on the results. How is that done with configuration options? That seems like it would just be a regular hashmap which is already efficient to read. What would a b-tree of key/values even look like that wouldn't be less efficient than a hashmap? |
|
Databases including SQLite usually use b+tree for tables (a variant where only the leaves have data, the interior nodes only have keys) and regular btrees for indexes.