Reputation: 958
I'm utilizing DynamoDB and EMR to create an application that tracks user statistics for a consumer product. I want to be able to do things like find all accounts that had over 20 comments every day for the last week. My current idea is to use account id as the hash key and time as my range key- I'll flatten the times so they conform to day/hour/week intervals and aggregate event data in one item. I plan on being able to track multiple events. Would using local secondary indicies on events be a good idea for this?
Upvotes: 0
Views: 970
Reputation: 7440
They are called local secondary indices because they still only work within the context of the primary key. The query find all accounts
means that you will still require a full table scan.
Were you thinking of using number of comments as the LSI?
Upvotes: 1