Querying tables
One of the most efficient ways of retrieving data from a DynamoDB table is by using the query operation on the table. One of the mandatory parameters or conditions to be provided while performing a query operation is performing a comparison operation on the primary key attribute value. The query operation supports the following comparison operations, namely:
EQ
: This stands for equal toLE
: This stands for less than or equal toLT
: This stands for less thanGE
: This stands for greater than or equal toGT
: This stands for greater thanBETWEEN
: This retrieves items whose primary key value is between the specified valuesBEGINS_WITH
: This retrieves items whose primary key begins with the specified value
These seven comparison operations can be performed directly on primary key values, which will retrieve only the necessary items (without even bothering the partitions/items that don't have this value). There are six more comparison operations that can be performed on the items...