Query and scan operations

The query operation is a very important operation that allows us to fetch specific items from the given table. It needs a primary input and an optional start key to compare with the list of items. The query fetches all matching entries to the input from a given table. You can also use comparison operations, such as greater than, less than, contains, between, and so on to narrow down the result set. Data returned from a query or scan operation is limited to 1 MB. If it does not find any matching items with respect to a given input key, it returns an empty set.

Query results are always sorted in the order of the range key value. By default, the order of sorting is ascending. If a table has secondary index, then the query ...

Get Mastering DynamoDB now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.