DVA-C02 Exam QuestionsBrowse all questions from this exam

DVA-C02 Exam - Question 358


A developer is working on an app for a company that uses an Amazon DynamoDB table named Orders to store customer orders. The table uses OrderID as the partition key and there is no sort key. The table contains more than 100,000 records. The developer needs to add a functionality that will retrieve all Orders records that contain an OrderSource attribute with the MobileApp value.

Which solution will improve the user experience in the MOST efficient way?

Show Answer
Correct Answer: D

The most efficient way to retrieve all Orders records that contain an OrderSource attribute with the MobileApp value is to create a global secondary index (GSI) with OrderSource as the partition key. Performing a Query operation on this GSI using MobileApp as the key will enable precise retrieval of the records, ensuring efficient query performance. This avoids the inefficiencies associated with Scan operations, which can be costly and slow for large datasets like the one in question.

Discussion

2 comments
Sign in to comment
Skip
Jul 1, 2024

Going for B, feel free to comment. I think these comments sections help me a lot!

SathishKumar Sundarasekaran
Jan 26, 2025

Option D: LSI can't use different partition key, it will use same table partition key so B is incorrect.

AlagongOption: D
Jul 2, 2024

Answer : D