0
0
DynamoDBquery~5 mins

LSI vs GSI comparison in DynamoDB - Quick Revision & Key Differences

Choose your learning style9 modes available
Recall & Review
beginner
What does LSI stand for in DynamoDB?
LSI stands for Local Secondary Index. It is an index that uses the same partition key as the base table but allows a different sort key.
Click to reveal answer
beginner
What does GSI stand for in DynamoDB?
GSI stands for Global Secondary Index. It allows you to create an index with a different partition key and sort key from the base table.
Click to reveal answer
intermediate
Can you add an LSI after creating a DynamoDB table?
No, LSIs must be defined when you create the table. You cannot add or remove LSIs later.
Click to reveal answer
intermediate
Can you add a GSI after creating a DynamoDB table?
Yes, GSIs can be added or deleted at any time after the table is created.
Click to reveal answer
intermediate
What is a key difference in data storage between LSI and GSI?
LSI shares the same partition key and storage as the base table, so it does not increase storage cost much. GSI stores data separately and can increase storage costs.
Click to reveal answer
Which index type in DynamoDB allows a different partition key than the base table?
AGlobal Secondary Index (GSI)
BSort Key
CPrimary Key
DLocal Secondary Index (LSI)
When can you add a Local Secondary Index (LSI) to a DynamoDB table?
AAnytime after table creation
BOnly after adding a GSI
COnly during table creation
DLSI cannot be added to DynamoDB tables
Which index type shares the same partition key as the base table?
ALSI
BGSI
CPrimary Key
DNone
Which index type can increase your storage costs more significantly?
ALSI
BBoth equally
CNeither affects storage cost
DGSI
Can you delete a Global Secondary Index (GSI) after creating a DynamoDB table?
ANo
BYes
COnly if no data exists
DOnly during table deletion
Explain the main differences between Local Secondary Index (LSI) and Global Secondary Index (GSI) in DynamoDB.
Think about keys, timing of creation, and storage.
You got /5 concepts.
    Describe when you would choose to use an LSI versus a GSI in DynamoDB.
    Consider query patterns and table design needs.
    You got /4 concepts.