key value store - DynamoDB Schema Design - Order Model -
i modeling simple application use dynamodb storage. need store order ecommerce website. possible query using order_id , user email.
looking @ dynamodb documentation, think best approach user order_id (most of queries made on index) primary key (partition key).
and email? secondary index, bit lost. best approach?
it looks global secondary index on email
attribute solve problem:
when need lookup
order_id
, usegetitem
operation , specifyorder_id
primary keywhen need lookup
email
, usequery
api on gsi , specifyemail
partition key.
gsi have independent read capacity units - since said use order_id of time, provision more rcu main table gsi.
reference:
Comments
Post a Comment