i try to understand suggestions for secondary indexes in dynamoDB (Video Time 09:41)
Course: AWS Certified Solutions Architect – Professional / Chapter 2
Last row in the table: “…rarely query but write or update frequently”
Why it will be very fast write or updates?
What is aim of GSI in that case / why do we need it? (rarely query ==> scan can be ok)
I understand it so:
we define GSI that includes required attributes (for search) and primary key from table
if we want to update some item(s):
o we search single or multiple items based on additional attributes in GSI
o take primary key(s) and in separate request update item(s) in
What do think?
P.S. Developer guide contains following:
If your application needs to query a table infrequently, but must perform many writes or updates against the data in the table, consider projecting KEYS_ONLY. The global secondary index would be of minimal size, but would still be available when needed for query activity.
Nothing about “…be very fast write or updates”
Thanks in advance!
I believe this is talking about using GSIs to perform write sharding.
Basically, designing the GSI so you can write to multiple partitions to resolve write contention on a "hot partition".
You can read more here…
There also an excellent DynamoDB class here on ACG that really solidified my DynamoDB knowledge and helped me design and implement it into several solutions.