Pre-computed lookup structures that turn O(n) table scans into O(log n) or O(1) lookups.
Find 33. Toggle the index and watch how many rows get checked.
Without an index the database scans every row until it finds a match. An index is a sorted lookup structure (usually a B-tree) that jumps almost straight to the row. The cost: indexes take space and slow down writes, since every insert must update them too.
Plain English: a database index is like the index at the back of a book. Without it, finding a topic means flipping through every page. With it, you jump straight to the right page. Same idea, applied to rows.
An auxiliary data structure that maps column values to row locations. The most common type is a B-tree (or B+-tree): sorted, balanced, range-query-friendly. LSM-trees are the alternative used by write-heavy stores (Cassandra, RocksDB).
Without an index, finding a row by some column means scanning every row, an O(n) operation. On a table with billions of rows, that's intolerable. An index turns that into a fast lookup.
B-tree: sorted by indexed column; lookups walk the tree (log n). Updates are in-place but require rebalancing. LSM-tree: writes go to a memory buffer, periodically flushed to immutable sorted files; reads check multiple files and a Bloom filter to skip ones that don't have the key. Writes are much faster (append-only) but reads are amortized.
Postgres index on short_key turns redirect lookups into O(log n)
Inverted index: the entire data structure that makes 'find documents containing X' fast
Geo index (geohash), a specialized spatial index
Index questions come up whenever you propose a database table. The interviewer wants you to proactively say which columns you'd index and why, not wait to be asked. The key signal is knowing that indexes have a cost: every index slows writes and adds storage, so you only add them for columns that appear in WHERE or JOIN conditions of frequent queries. Candidates lose points by either missing indexes entirely or proposing indexes on every column.