Index (database)

A database index is any data structure that improves the performance of lookup and sorting compared to a full table scan, for example, or a full database scan.  

As well as traditional SQL relational databases (RDBMS), indexing is also implemented by most NoSQL databases for semi-structured data, such as document databases and graph databases.    

There are many different data structures used for indexes, partly depending on the type of database. In an RDBMS, for example, this could be thought of as making the chosen index column faster to search than an unindexed version of the column, thereby finding that whole row faster.  

Different types of database also have different limitations regarding indices. Some document databases, for example, will not return any data to a query if that data is not indexed.

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

Category:Databases