Forum Replies Created

Viewing 1 of 1 posts
  • MasonM

    Member
    September 28, 2021 at 2:54 am

    Hi Carlo,

    Thanks for the reply, but it contradicts the official documentation, which says “In general, you should use global secondary indexes rather than local secondary indexes”. I can’t find anything that says you should prefer LSIs when the partition key is the same, or that creating a GSI with the same partition key “defeats its purpose”.

    It’s not official, but here’s a great article that gives a flowchart showing when you should choose GSI over a LSI, and when I follow the flowchart, it’s clear that the right answer in this scenario is a GSI: https://www.dynamodbguide.com/local-or-global-choosing-a-secondary-index-type-in-dynamo-db/

    Mason

Viewing 1 of 1 posts