exam questions

Exam AWS Certified Database - Specialty All Questions

View all questions & answers for the AWS Certified Database - Specialty exam

Exam AWS Certified Database - Specialty topic 1 question 247 discussion

Exam question from Amazon's AWS Certified Database - Specialty
Question #: 247
Topic #: 1
[All AWS Certified Database - Specialty Questions]

A social media company is using Amazon DynamoDB to store user profile data and user activity data. Developers are reading and writing the data, causing the size of the tables to grow significantly. Developers have started to face performance bottlenecks with the tables.
Which solution should a database specialist recommend to read items the FASTEST without consuming all the provisioned throughput for the tables?

  • A. Use the Scan API operation in parallel with many workers to read all the items. Use the Query API operation to read multiple items that have a specific partition key and sort key. Use the GetItem API operation to read a single item.
  • B. Use the Scan API operation with a filter expression that allows multiple items to be read. Use the Query API operation to read multiple items that have a specific partition key and sort key. Use the GetItem API operation to read a single item.
  • C. Use the Scan API operation with a filter expression that allows multiple items to be read. Use the Query API operation to read a single item that has a specific primary key. Use the BatchGetItem API operation to read multiple items.
  • D. Use the Scan API operation in parallel with many workers to read all the items. Use the Query API operation to read a single item that has a specific primary key Use the BatchGetItem API operation to read multiple items.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
silvaa360
1 year, 5 months ago
"read multiple items that have a specific partition key and sort key" The sentence iftself is wrong, or I'm completely blind. The query will only read multiple items if you have a pk+sk and you query by pk, but if you have pk+sk and query with both, only one result will be presented.
upvoted 1 times
...
MrAliMohsan
1 year, 11 months ago
A and D are out of the question since we cannot consume all the capacity. Between B and C. Since C is using BatchGetItem so it can read at max 100 items at a time while B is using Query API that can read as many items as matched with the query. Moreover reading a single item with GetItem is way faster than Querying that item as suggested in C. So B is my answer.
upvoted 2 times
...
Sathish_dbs
2 years, 4 months ago
Parellel scan does not meet the requirement of "without consuming all the provisioned throughput for the tables?" as it can consume fully quickly unless if we handle it carefully. so Option B is the right one.
upvoted 1 times
...
saikirankshatriya
2 years, 6 months ago
Option should be A. As filter will still bring all the associated records which doesnt help the use case instead use the parallelscan which scan operation can logically divide the table into multiple segments.
upvoted 2 times
Sathish_dbs
2 years, 4 months ago
it says should not consume all throughput but A does that. A parallel scan with a large number of workers can easily consume all of the provisioned throughput for the table or index being scanned. It is best to avoid such scans if the table or index is also incurring heavy read or write activity from other applications. To control the amount of data returned per request, use the Limit parameter. This can help prevent situations where one worker consumes all of the provisioned throughput, at the expense of all other workers.
upvoted 2 times
...
...
Zimboguru
2 years, 7 months ago
Why not A https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Scan.html#Scan.ParallelScan > The larger the table or index being scanned, the more time the Scan takes to complete. In addition, a sequential Scan might not always be able to fully use the provisioned read throughput capacity: Even though DynamoDB distributes a large table's data across multiple physical partitions, a Scan operation can only read one partition at a time. For this reason, the throughput of a Scan is constrained by the maximum throughput of a single partition. To address these issues, the Scan operation can logically divide a table or secondary index into multiple segments, with multiple application workers scanning the segments in parallel.
upvoted 3 times
...
JeanGat
2 years, 7 months ago
Selected Answer: B
B. Comparing to C - which has BatchGetItem as the last step. This will do up to 100 GetItem requests. https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/SQLtoNoSQL.ReadData.html Definitely not A or D.
upvoted 2 times
koki2847
1 year, 1 month ago
You are right. And it may do so in parallel which loads on throughput. "In order to minimize response latency, BatchGetItem may retrieve items in parallel" https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchGetItem.html
upvoted 1 times
...
...
mbar94
2 years, 8 months ago
Selected Answer: B
Agree, it's B.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago