Which solution will meet these requirements?
Increase the page size for each request by setting the Limit parameter to be higher than the default value. Configure the application to retry any request that exceeds the provisioned throughput.
Create a global secondary index (GSI). Set query attribute to be the partition key of the index.
Perform a parallel scan operation by issuing individual scan requests. In the parameters, specify the segment for the scan requests and the total number of segments for the parallel scan.
Turn on read capacity auto scaling for the DynamoDB table. Increase the maximum read capacity units (RCUs).
Explanations:
Increasing the page size and configuring retries does not directly improve query performance. It may help in retrieving more data per request but will not optimize the way DynamoDB processes the queries, especially when querying non-key attributes.
Creating a global secondary index (GSI) allows the application to query the table based on an attribute that is not the primary key. By setting the query attribute as the partition key of the index, it optimizes access patterns and significantly improves query performance on the specified attribute.
Performing a parallel scan operation is less efficient for targeted queries compared to a GSI. It scans the entire table without leveraging indexed access, which may lead to higher latency and resource consumption, especially as the dataset grows.
Turning on read capacity auto-scaling can help manage throughput but does not specifically address the inefficiency of queries involving non-key attributes. It increases overall capacity but does not improve the query execution time for non-indexed attributes.