When designing a DynamoDB table for a customer rewards application, the developer wants to optimize query performance and reduce the chance of hot partitions before running performance tests. Which attribute is the best choice to use as the partition key?
Choose an answer
Tap an option to check your answer.
Correct answer: A randomly generated UUID for each customer record..
Why this is the answer
A randomly generated UUID for each customer record is the best choice because it ensures a high cardinality and even distribution of data across partitions. This minimizes the risk of hot partitions, where a disproportionate amount of read/write activity is directed to a single partition, leading to performance bottlenecks. The customer's full name is a poor choice due to varying lengths, potential for duplicates, and non-uniform distribution (e.g., common names). The signup date would lead to hot partitions as many customers sign up on the same day. The pet's name is unsuitable due to low cardinality and potential for many customers sharing the same pet name.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed