Section: IT & Technology · DatabasesDifficulty: Medium
Database Index
USUK
A data structure that improves the speed of data retrieval operations on a database table.
Definition
A database index is a data structure (typically a B-tree or hash) that improves the speed of data retrieval operations on a database table at the cost of additional storage space and write performance. Indexes allow the database engine to find rows matching a query condition without scanning the entire table. While indexes dramatically speed up reads, they slow down writes because the index must also be updated. Choosing which columns to index is a critical performance optimization.
Example
“Adding an index on the 'email' column of a users table reduces a login query from 5 seconds (full table scan of 10M rows) to 2 milliseconds.”
Synonyms
- database index
- query index
- search index
- B-tree index
Antonyms / Opposites
- full table scan
- unindexed query
Images
CC-licensed · free to useLoading images…
Video
Related Terms
- sql
- query-optimization
- btree
- database-performance
