Amazon DynamoDB (50 Qs)•Part 2: Intermediate Data Modeling & API Operations (Mid-Level)
What are the GSI Projection types and their performance trade-offs?
senior LevelFormsPerformanceHTTP & REST APIs
In Simple Words: When defining a secondary index, you choose which attributes to duplicate from the base table:
KEYS_ONLY: Only the base table primary keys and index keys are copied. Consumes minimum storage and WCU, but requires extra base table lookups if non-key fields are needed.INCLUDE: Copies index keys plus a whitelist of specified attributes. Best balance of speed and cost.ALL: Copies every attribute into the index. Maximizes query speed at the expense of higher storage cost and higher index write capacity.