Local secondary indexes best practices

We have seen what local secondary indexes mean in Chapter 2, Data Models. Just to revise, they are secondary indexes that you can define on certain attributes, and which can be used as another range key along with your table hash key. As we have seen, since DynamoDB needs to maintain a complete separate index for these indexes, we have to allocate more resources to it, which makes it a costly affair. So, it is very important to decide on the attribute on which you wish to define the secondary index. It is recommended that the attribute you are not going to query much should not be defined as local secondary index. Indexing should be done for the tables that do not get heavy writes as maintaining those indexes ...

Get Mastering DynamoDB now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.