2 ms·
Any reasonable database index implementation will utilize data structures which address this exact flavor of concern. Concepts like the splay tree can optimize
by bob1029 6y ago
Any reasonable database index implementation will utilize data structures which address this exact flavor of concern. Concepts like the splay tree can optimize the locality of access dynamically based upon actual access patterns over time. But, you are right in that this locality of access property is available by default using integral types without the constraint imposed of needing to use a particular kind of dynamic data structure.
- barrkel 6y agoPlenty of databases use b+trees, which don't address this exact flavour of concern. In my direct experience, MySQL will perform quite poorly with lots of random lookups once your index starts getting to a meaty size.