Index
also: indexes, indices, indexed, database index
A shortcut the database keeps so it can find matching data fast, instead of checking every entry one by one.
A separate data structure, often a B-tree, built on one or more columns so the database can locate matching rows without scanning the whole table. Indexes speed up reads but use storage and slightly slow down writes.
The index at the back of a cookbook. To find every recipe with lemon, you check the index and jump to the right pages, instead of reading the whole book.
When a page slows down as your data grows, a missing index is one of the most common causes. Agents often propose adding one. Now you'll know what that means and why it's usually a fairly safe change.
The query on bookings.customer_id is doing a full table scan. Adding an index on that column should make it much faster.
The orders page got slow. Check whether its queries are missing an index, and explain the tradeoff before adding one.
Thinking more indexes are always better. Each one costs storage and makes every insert and update a little slower. Add them where real queries need them.