3 ms·
What about stopping when the ends of the range are "close enough" and switching to a linear search? All the data should be in the cache, and it should be possib
by geophile 11y ago
What about stopping when the ends of the range are "close enough" and switching to a linear search? All the data should be in the cache, and it should be possible to avoid branches.
- trhway 11y agothis is why in real db the indexes aren't in pure binary tree, it is a variation of B-tree instead. So a billion rows table will have only 4 levels deep index (ie. 4 disk reads worse case).
- deleted 11y ago[deleted]