Skip to content

Confused with clustered index #193

Answered by tywalch
Derek-X-Wang asked this question in Q&A
Discussion options

You must be logged in to vote

I @Derek-X-Wang 👋

Index types ultimately impact how the sort key is structured, which impacts how the values are stored in DynamoDB. In DynamoDB, items stored in the order of how their sort key sorts (duh, I know haha). As a result though, if you're trying to perform a partial query to retrieve multiple entities (a "collection" of entities), the results you get returned to you come back in this order as well. This isn't a problem if the items under your partition key can be retrieved in a single query -- however if your partition key has many items, and represent many entities, then it becomes important to consider how your items sort within your partition key. Should they be grouped toge…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Derek-X-Wang
Comment options

Answer selected by Derek-X-Wang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants