简体   繁体   中英

query DynamoDB, return result based on timestamp

Folks, I have a DynamoDB table where the HashKey is EmailAddress and RangeKey is a Date... For example:

Hash Key          Range Key
test@test.com     Thu, 03 Oct 2013 14:55:44 GMT
foo@bar.com       Thu, 03 Oct 2013 14:48:12 GMT

Now, I would like to query the database to return a list of emails that have been inserted after a certain time :) Is this possible? I am starting to think that my Hash Key should be something different, and have another field which stores the Email address itself...

Thanks!

You can only do it with a Scan operation, thus eliminating any chance of indexing.

With scan you can add conditions. However as you wrote, this is probably not the best approach to your scenario.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM