Introduction to Secondary Indexes In DynamoDB
Understand the basics of the local secondary indexes and global secondary indexes.
We'll cover the following...
Utility of secondary indexes
We have seen how we can query on primary keys or scan the table. Both the options for reading data have their respective trade-offs. Querying on the primary key is fast, but it can only give us a limited set of access patterns. The scan can give us any access pattern, but it is slow and costly. There is a third way, using a secondary index, which is relatively cheap and provides us with more access patterns.