What searching algorithm does Dynamodb use?

ⅰ亾dé卋堺 提交于 2020-11-29 10:36:54

问题


The reason for this question is:

We are planning to have a UUID as a partition key for an id of a user, company, and load tables for a load board project and we are using DynamoDB.

The thing is when we have thousands of records in a DynamoDB supposedly a user table and I want to search a user with their user-id.

Will the search be more efficient with UUID(ff44393c-bec6-4005-a966-15050fd9bb77) or normal Interger id like (001,002.....)?as partition key.

I could also see that UUID format is a standard which is maintained by most of the application but not sure if their use cases match ours?


回答1:


There is AWS blog which gives recommendations regarding the partition key:

  • Choosing the Right DynamoDB Partition Key

One of the recommendations given is:

Use high-cardinality attributes. These are attributes that have distinct values for each item, like e-mailid, employee_no, customerid, sessionid, orderid, and so on.

What's more they write that using sequences is an anti-pattern. Thus, it think UUID would be better in your case.



来源:https://stackoverflow.com/questions/64746057/what-searching-algorithm-does-dynamodb-use

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!