Introduction
We want to find data quickly and efficiently in DynamoDB. Understanding the difference between Scan and Query helps us choose the faster way.
When you know the exact key of the item you want to find.
When you want to get all items but only a few match your condition.
When you want to read the whole table without filtering.
When you want to save time and reduce cost by reading less data.
When you want to avoid reading unnecessary data from the database.