> For the complete documentation index, see [llms.txt](https://til.notdu.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://til.notdu.com/database/intro-to-database-systems/tree-indexes-i/table-indexes.md).

# Table indexes

A table index is a replica of a subset of a table's attributes that are organized and/or sorted for efficient access using a subset of those attributes.

The DBMS ensures that the contents of the table and the index are logically in sync.

\---

It is the DBMS's job to figure out the best index(es) to use to execute each query.

There is a trade-off on the number of indexes to create per database

-> Storage Overhead

-> Maintenance Overhead&#x20;
