index

/IN-deks/ · noun · Development · Origin: 1970

Definitions

  1. A data structure (typically a B-tree or hash table) that speeds up data retrieval operations on a database table at the cost of additional storage and slower writes. Without appropriate indexes, databases must scan every row to find matching records. Too many indexes, however, degrade write performance and waste storage.

    In plain English: A shortcut that helps a database find records faster, like a book's index — it makes reading faster but makes adding new entries a bit slower.

    Example: The migration added an index on (user_id, created_at) and the dashboard query went from 12 seconds to 40 milliseconds.

Related Terms