Been having a hard time trying to find a definitive answer on this.
I need to mass insert a lot of data into a dyanmoDb table with a sort key (a DateTime). As far as I can tell, the order in which the data is inserted in unimportant, but I am trying to verify that.
If I need to insert a years worth of data for the same primary key, should it be done in a certain order, or does it not matter at all?
Thanks
2
Answers
Mass inserting data with a sort key (a DateTime) in DynamoDB, the order in which the data is inserted is not crucial, as long as the sort key values are unique for each item. DynamoDB will automatically manage the storage and retrieval of the items based on the sort key values, regardless of the order in which they were inserted.
The order DOES matter.
If you want the benefits of "split for heat" then you’ll want to avoid an ever-increasing sort key. From https://aws.amazon.com/blogs/database/part-3-scaling-dynamodb-how-partitions-hot-keys-and-split-for-heat-impact-performance/