
Answer-first summary for fast verification
Answer: Optimize query access by creating a global secondary index with the query attribute as its partition key.
To improve the performance of queries on a DynamoDB table, especially when the data volume is expected to increase significantly, creating a Global Secondary Index (GSI) is a recommended approach. GSIs allow you to query on non-primary key attributes efficiently by defining a different partition key and sort key specific to the performance-critical queries. This makes option B the correct solution as it sets the query attribute to be the partition key of the index, optimizing your query performance. Increasing the page size, performing parallel scans, or enabling auto-scaling might help in some scenarios but would not specifically address the issue of slow queries related to non-primary key attributes as effectively as a GSI.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
An AWS-hosted application utilizes a DynamoDB table, facing performance issues with certain attribute-based queries not aligned with the table's primary key structure. With an anticipated data growth, how can a developer enhance query performance?
A
Enhance request efficiency by increasing the Limit parameter's page size and implementing retries for throughput-exceeding requests.
B
Optimize query access by creating a global secondary index with the query attribute as its partition key.
C
Accelerate query processing through parallel scan operations, defining segments for individual scan requests within the total segment count.
D
Scale read performance by enabling auto scaling for read capacity and raising the read capacity unit limit.
No comments yet.