最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Amazon Web Services DynamoDB Multiple Partition Keys - Stack Overflow

programmeradmin1浏览0评论

Is there a way to have multiple partition keys in a DynamoDB table? I currently have an ID field as the partition key. Which means I can only use get when passing in the ID. I would like to be able to use get for other fields such as email, first name, last name, etc.

My current method is I do a scan of the DB and run through a loop to find the record I'm looking for. Which is not very scalable and not a good method.

Any good way to do this by either adding more partition keys or is there another method I'm not seeing?

Is there a way to have multiple partition keys in a DynamoDB table? I currently have an ID field as the partition key. Which means I can only use get when passing in the ID. I would like to be able to use get for other fields such as email, first name, last name, etc.

My current method is I do a scan of the DB and run through a loop to find the record I'm looking for. Which is not very scalable and not a good method.

Any good way to do this by either adding more partition keys or is there another method I'm not seeing?

Share Improve this question asked Aug 11, 2016 at 18:57 Charlie FishCharlie Fish 20.6k23 gold badges106 silver badges198 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 7

You can create Global Secondary Indexes on other fields.

发布评论

评论列表(0)

  1. 暂无评论