Global Secondary Index

Learn what a global secondary index is and how it can be used in DynamoDB.

There could be use cases when it’s necessary to look for information based on a partition key other than the one defined when a table is created. It could be a naive approach if we tried to get information by executing some type of scanning, as this would affect consumption and performance. To deal with these types of scenarios, DynamoDB gives us global secondary indexes (GSI).

Global Secondary Indexes

Global secondary indexes (GSIs) enable us to get records from a table without scanning it, or, at the very least, without looking for a partition key and comparing records that match particular criteria. These types of indexes seem similar to LSIs. However, they are different not only in the functionality they provide, but also in the underlying implementation they have.

Get hands-on with 1200+ tech skills courses.