Orders are stored with customer ID as the primary access key.
Frequently query by shipping status without scanning the entire table.
Which design is most appropriate?
Create a DynamoDB Global Secondary Index using shipping status so the alternate access pattern can use Query instead of Scan.
Detailed explanation
A GSI provides an index with a key different from the table's primary key for an alternate query pattern.
A GSI provides an index with a key different from the table's primary key for an alternate query pattern.
Archive storage is not intended for low-latency online queries.
Archive storage is not intended for low-latency online queries.
DNS records are not a DynamoDB query index.
DNS records are not a DynamoDB query index.
A full scan reads all items and becomes costly and slow as the table grows.
A full scan reads all items and becomes costly and slow as the table grows.
Check official documentation
Compare the following points with the official documentation.
DynamoDB Global Secondary Indexの公式説明を確認する。
What to confirm
アクセスパターンに合うインデックスを設計できる。
Key points
- DynamoDB Global Secondary Index
- Access pattern
- Query versus Scan
Notes
- Environment: AWS公式DynamoDBドキュメントの確認
- Confirm current AWS service behavior in the official documentation.
Foundation review
Model for access
DynamoDB performance depends on modeling the keys for the queries the application needs.
Read cost
A full scan consumes work across the table even when only a small subset matches.