So I have below rows in DynamoDB with example data. I want to find out the count
in below format. Currently I am doing query
and pagination
to achieve this but its terribly slow due to huge number of rows in millions. Is there any other faster way to do it since I need to find only the count and not individual items.
Example Data
BrandName BrandCode Eventid
ABC 123 30100
ABC 123 30111
XYZ 456 30100
XYZ 456 30111
OUTPUT
Number of events : 2
Above since there are only 2 types of events based on the eventid
. I want their count as 2
Note : The main intent of the application is to store the events that come from external system. We just want the above as an audit to check what count of events were consumed and what were persisted.