databasesHow a database index avoids checking every row
A database index stores selected values in a structure designed for efficient lookup. Instead of examining every row to find a matching email address, the database may use the index to narrow the search. This can speed reads, but the extra structure consumes storage and must be maintained when relevant data changes.