Difference between local and global indexes in DynamoDB

前端 未结 7 2019
轻奢々
轻奢々 2020-12-22 15:42

I\'m curious about these two secondary indexes and differences between them. It is hard to imagine how this looks like. And I think, this will help more people than just me.

7条回答
  •  鱼传尺愫
    2020-12-22 16:15

    Another way to explain: LSI helps you do additional queries on items with same Hash Key. GSI helps you do the similar queries on items "across the table". So very useful.

    If you have a user profile table: unique-id, name, email. Here if you need to make the table queryable on name, email - then the only way is to make them GSI (LSI wont help)

提交回复
热议问题