3 ms·
Illniyar is right, a b-tree with a branching factor of 100 can index 100M rows in 4 levels. Even with the index on a spinning disk, should have no trouble comin
by gkop 10y ago
Illniyar is right, a b-tree with a branching factor of 100 can index 100M rows in 4 levels. Even with the index on a spinning disk, should have no trouble coming in well under 100ms.
- ad-hominem 10y agoAnd that right there's the math
- falcolas 10y agoIndexes like this are also typically in memory to begin with, making it even faster, since you only have to find the actual record on disk. Even better, if you only need one field from the record, and it's part of a compound index, you can frequently return the data from just the indexes; no disk seeks required. Small tip with InnoDB on MySQL - any non-primary key index is automatically a compound index with the primary key.