Database Reference
In-Depth Information
Choosing projections carefully
From a cost perspective, if we don't want to pay too much to DynamoDB, then we must
choose the projections carefully. As long as each item size is not greater than 1 KB (1 capa-
city unit), even if we project all the attributes (or only the KEY attributes), it doesn't make
any change in the billing, but the speed of retrieval will differ. So it's better to project only
the attributes to be retrieved frequently using the query operation. Otherwise, a lot of time
and money will be spent on I/O and storage.
Do you have the same question that I have? If we need to project only the necessary attrib-
utes into the index, then what is the use of the projection type ALL ? There is a slight but
important difference.
If the index is created with the same hash and range key (using ALL as the projection type),
then there is no point in creating the index at all: both will function the same. Then what is
the use of the index with the projection type ALL ? It is useful only if the range key is dif-
ferent, otherwise it is of no use. It will consume twice the storage without doing anything.
Search WWH ::




Custom Search