Recall & Review
beginner
What is a Scan operation in DynamoDB?
A Scan operation reads every item in a table or a secondary index. It examines all data and returns matching results, which can be slow for large tables.
Click to reveal answer
beginner
What is a Query operation in DynamoDB?
A Query operation finds items based on primary key values. It is efficient because it looks only at items with matching partition keys, not the whole table.
Click to reveal answer
beginner
Why is Query generally faster than Scan in DynamoDB?
Query targets specific partition keys, so it reads fewer items. Scan reads the entire table, which takes more time and resources.
Click to reveal answer
intermediate
When might you use Scan instead of Query?
Use Scan when you need to retrieve data without knowing the partition key or when filtering on non-key attributes, but expect slower performance.
Click to reveal answer
intermediate
How can you improve Scan performance in DynamoDB?
You can improve Scan by using filters to reduce returned data, paginating results, or using parallel scans to read data faster.
Click to reveal answer
Which DynamoDB operation reads the entire table?
✗ Incorrect
Scan reads every item in the table, while Query targets specific partition keys.
Which operation is more efficient for retrieving items by partition key?
✗ Incorrect
Query uses the partition key to quickly find matching items.
What is a downside of using Scan in DynamoDB?
✗ Incorrect
Scan reads the whole table, which can be slow and costly.
How can you reduce the amount of data returned by a Scan?
✗ Incorrect
Filters limit the data returned after scanning all items.
Which operation should you use if you know the partition key of the item?
✗ Incorrect
Query efficiently retrieves items by partition key.
Explain the main differences between Scan and Query operations in DynamoDB and their impact on performance.
Think about how much data each operation reads.
You got /4 concepts.
Describe scenarios where you would choose Scan over Query in DynamoDB despite performance costs.
Consider cases where you can't use the primary key.
You got /4 concepts.