IT lexicon › Database › Local secondary index (LSI)

Local secondary index (LSI)

Database På svenska → Updated: 2026-05-29

A secondary index in a distributed database that is partitioned together with the main data (same partition key). Writes become cheap (the index is updated locally on the same node), but a search that doesn't specify the partition key must query all partitions.

Mechanic: the index is co-located with the data — each partition has its own local index over only its rows. Win: a write only updates the local index (no cross-node traffic, atomic with the row). Price: a query on the index value must either include the partition key (then it goes to one node) or run as a "scatter-gather" against all partitions and merge the results (expensive with many nodes). Distinct from a global secondary index (partitioned on the index value → cheap reads, expensive writes). In DynamoDB an LSI must also be defined at table creation and shares the partition key with the table. The opposite trade-off to a GSI. Related to global secondary index and celebrity problem.

← Back to the lexicon