Shared explainer · works offline
Someone sent you a concept to explore.
AI chose playground · Changing table size makes the widening gap between linear scanning and logarithmic lookup visible.
Database indexing
Change table size and compare a full scan with a logarithmic index lookup.
This is why a query that was fast in development can stall against a production-sized table.
Table size
10,000
Scan / index work
714×
Theoretical n ÷ ⌈log₂ n⌉
Full scan — O(n)
B-tree lookup — O(log n)