Topic 1 Question 71
A developer is working on an existing application that uses Amazon DynamoDB as its data store. The DynamoDB table has the following attributes: partNumber (partition key), vendor (sort key), description, productFamily, and productType. When the developer analyzes the usage patterns, the developer notices that there are application modules that frequently look for a list of products based on the productFamily and productType attributes.
The developer wants to make changes to the application to improve performance of the query operations.
Which solution will meet these requirements?
Create a global secondary index (GSI) with productFamily as the partition key and productType as the sort key.
Create a local secondary index (LSI) with productFamily as the partition key and productType as the sort key.
Recreate the table. Add partNumber as the partition key and vendor as the sort key. During table creation, add a local secondary index (LSI) with productFamily as the partition key and productType as the sort key.
Update the queries to use Scan operations with productFamily as the partition key and productType as the sort key.
ユーザの投票
コメント(2)
- 正解だと思う選択肢: A
reate a Global Secondary Index (GSI): The developer should create a new GSI on the DynamoDB table with the productFamily attribute as the partition key and the productType attribute as the sort key. This will allow the application to perform fast queries on these attributes without scanning the entire table.
👍 4Fyssy2023/04/17 - 正解だと思う選択肢: A
LSI can´t be created on an already existing table and as Fyssy says. A - create new GSI will make the querying faster and you do not need to recreate the whole table.
👍 1Majong2023/05/25
シャッフルモード