I read that dynamo db scan operation is slow when the data is large . but i want to know that, Having a scenario to extract all the items. Is it still preferred to avoid scan ? considering indexes are not free and i need all the items from table, i am going for this approach.
- Please suggest if their is any problem by choosing scan operation ?
- why only scan has parallel scan option, is query parallel by default ?
- if i use query operation with pagination will it run sequential or parallel?
If you need all items, then Scan() is perfectly fine.
Just realize that DDB
ExclusiveStartKey
:=LastEvaluatedKey
The recommendation against Scan() is trying to use Scan() + filter in place of Query() for a subset of records. Scan() always reads the full table.
Also note that from a performance standpoint, Scan() supports parallel scans.
But again, if using provisioned reads...a parallel scan will eat up RCU quickly.