Ravindra BagaleCourses & study guides मराठी Track your progress

Ravi Sir's Cards › AWS

AWS Cloud

Query, not scan

This revision card explains Query, not scan. It starts from the need that reading the whole table is slow and costly. It describes query uses the partition key and a sort key range. The how-to section notes scan reads all items, then filters.

Query, not scan Reading the whole table is slow and costly. Query uses the partition key and a sort key range. Scan reads all items, then filters. Need a new pattern? Add a GSI and query it.
Query, not scan · Download PNG
Read card text

What this card says

Why do we need it?

Reading the whole table is slow and costly.

What is it?

Query uses the partition key and a sort key range.

--key-condition-expression

How to do it

Scan reads all items, then filters.

ScannedCount

Example

Need a new pattern? Add a GSI and query it.

See all AWS revision cards