Jump to content

Index (database)

From Simple English Wikipedia, the free encyclopedia
Revision as of 10:13, 25 March 2023 by Pretender451 (talk | changes) (added sorting)

A database index is any data structure that improves the performance of lookup and sorting compared to a full table scan for example. There are many different data structures used for this purpose, to make a column - the index column - faster to search than an unindexed version of the column.


The benefits of indexing is not without cost. There are trade-offs involving lookup performance, index size, and index-update performance. As so often with design, this means that the best way to set up your indexing depends on your intended usage and resources.


Different types of database (eg traditional SQL DBs or Relational DB Management Systems (RDBMS), and noSQL DBs such as Document DBs) also have different limitations regarding indices. Some Document DBs, for example, may not return any data to a query if that data is not indexed.