Q: 9
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 OrderlD 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?
Options
Discussion
D . Adding a GSI with OrderSource as the partition key lets you query just for MobileApp, much faster than Scan. Makes sense for a big table like this. Disagree?
Had something almost identical in a mock. It's A since Canary10Percent10Minutes matches the traffic shifting and time window, plus AutoPublishAlias is needed for CodeDeploy to handle the rollout. Pretty sure that's what AWS expects here, but open to thoughts.
Probably D for this. Scan (A) just isn't efficient with big tables, and LSIs (B) require the same partition key so that's out. GSIs really help when you need to query by non-key attributes. Correct me if I've missed something.
Honestly I'd go for A. Scan with a filter seems more straightforward if you don't expect crazy query volumes.
Be respectful. No spam.