Your development team is currently working with an application that interacts with the DynamoDB table.
Due to the proposed extensive use of the application, the underlying DynamoDB table would undergo a steady growth in size.
Which of the following preferred options should be used for retrieving the data? Choose 3 answers from the options given below.
Click on the arrows to vote for the correct answer
A. B. C. D.Answer - A, C and D.
The AWS Documentation mentions the following.
If possible, you should avoid using a Scan operation on a large table or index with a filter that removes many results.
Also, as a table or index grows, the Scan operation slows.
The Scan operation examines every item for the requested values and can use up the provisioned throughput for a large table or index in a single operation.
For faster response times, design your tables and indexes so that your applications can use Query instead of Scan.
(For tables, you can also consider using the GetItem and BatchGetItem APIs.)
Option B is incorrect since this would cause performance issues as the amount of items starts to increase.
For more information on best practices for the query and scan operation, please refer to the below URL-
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-query-scan.htmlWhen dealing with a large DynamoDB table, it's important to choose the appropriate operation to retrieve data efficiently. The three preferred options for retrieving data from a DynamoDB table with steady growth are as follows:
Use the Query operation: The Query operation is the most efficient way to retrieve a subset of data from a DynamoDB table. It is designed to retrieve items that match specific key values. The Query operation can be used to fetch data from a single partition or a range of partitions. Since the Query operation only fetches items that match a specific key value, it can help reduce the number of read operations and lower the cost of data retrieval.
Use the BatchGetItem API command: The BatchGetItem API command can be used to retrieve up to 100 items at once from one or more tables in a single request. It is best used when you know the primary key values for the items you want to retrieve. The BatchGetItem operation is more efficient than individual GetItem operations because it minimizes the number of network round trips required to retrieve data.
Use the GetItem API command: The GetItem API command is best used when you need to retrieve a specific item from a DynamoDB table. It retrieves a single item from a table using its primary key. The GetItem operation is less efficient than the Query operation and the BatchGetItem operation because it requires a read operation for each item retrieved.
Do NOT use the Scan operation: The Scan operation retrieves all items from a DynamoDB table and applies an optional filter to the results to refine the search. The Scan operation can be expensive and time-consuming, especially on large tables, and should be avoided whenever possible.
In summary, the preferred options for retrieving data from a DynamoDB table with steady growth are the Query operation, the BatchGetItem API command, and the GetItem API command. The Scan operation should be avoided due to its potential cost and performance issues.