1
SQLAdvanced#indexes
An index is usually a B-tree that lets the engine locate rows without scanning the whole table. It speeds up filtering, joining and sorting but slows down INSERT/UPDATE/DELETE and consumes storage.
CREATE INDEX idx_orders_customer ON orders(customer_id); -- SELECT * FROM orders WHERE customer_id = 42; now uses an index seek