Revision Notes/Database Concepts
Field Entry - Database Concepts
Database Indexing
An index is a data structure that speeds up data retrieval by allowing the database to find rows without scanning the entire table.
Field Note - Real-world Analogy
“Like the index at the back of a textbook. To find all pages about "polymorphism", you don't read every page from cover to cover — you look it up in the alphabetical index and jump directly to pages 45, 89, 210. The index is sorted, so finding the word is fast even if the book has 1000 pages.”
Field Observations - Key Topics Covered
Without an index, a SELECT WHERE email = "user@example.com" does a full table scan — it reads every single row until it finds matching ones. On a table with 100 million rows, this could take tens of seconds. With an index on the email column, the database navigates a B-tree structure to find the row in milliseconds.
4 more observations inside
Sign in to read every key point in full
Ready to go deeper?
Open the complete revision note.
Sign in to read every field observation in full, including a runnable code example and side-by-side comparisons with related patterns.
Read Full NotesSee Also in Database Concepts