Backend & systems·Data modelling and storage engines
you add an index and the query that was scanning ten million rows starts answering in a millisecond by walking a sorted tree.
B-tree index
Also calledB+ tree
The default index structure in relational databases: a balanced, sorted tree giving logarithmic lookups and cheap range scans in key order. It is excellent for reads and mediocre for write-heavy workloads, because every insert may split pages in place. Each index you add is another structure every write has to maintain.