
Answer-first summary for fast verification
Answer: Create a global secondary index focusing on productFamily and productType.
The correct answer is A. The developer should create a global secondary index (GSI) with productFamily as the partition key and productType as the sort key. A GSI allows for efficient querying of secondary attributes without scanning the entire table. Unlike a Local Secondary Index (LSI), which must be defined at table creation and cannot be added to an existing table, a GSI can be created and added to an existing table, making it the optimal solution in this scenario.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
In an application using Amazon DynamoDB, which indexing strategy should a developer implement to enhance query performance for frequently accessed products by productFamily and productType attributes?
A
Create a global secondary index focusing on productFamily and productType.
B
Create a local secondary index focusing on productFamily and productType.
C
Recreate the table with an index on productFamily and productType as part of the schema.
D
Modify queries to perform Scan operations using productFamily and productType.