Recall & Review
beginner
What is a Global Secondary Index (GSI) in DynamoDB?
A Global Secondary Index (GSI) is an index with a partition key and optional sort key that can be different from the base table's keys. It allows querying data efficiently using alternate keys across all table data.
Click to reveal answer
beginner
What is a Local Secondary Index (LSI) in DynamoDB?
A Local Secondary Index (LSI) is an index that uses the same partition key as the base table but a different sort key. It allows querying data within the same partition using alternate sort keys.
Click to reveal answer
intermediate
Can you add a Global Secondary Index (GSI) after creating a DynamoDB table?
Yes, you can add a GSI to an existing DynamoDB table at any time without downtime.
Click to reveal answer
intermediate
Can you add a Local Secondary Index (LSI) after creating a DynamoDB table?
No, LSIs must be defined when the table is created and cannot be added later.
Click to reveal answer
intermediate
What is a key difference in storage between GSI and LSI?
LSIs share the same partition key and storage as the base table, while GSIs have their own storage and can have different partition keys.
Click to reveal answer
Which index type in DynamoDB can have a different partition key than the base table?
✗ Incorrect
GSIs allow a different partition key from the base table, enabling flexible queries.
When can you add a Local Secondary Index (LSI) to a DynamoDB table?
✗ Incorrect
LSIs must be defined when creating the table and cannot be added later.
Which index type shares the same partition key as the base table?
✗ Incorrect
LSI uses the same partition key but a different sort key.
What happens to storage when you create a Global Secondary Index (GSI)?
✗ Incorrect
GSIs have their own storage separate from the base table.
Which index type can be added to a DynamoDB table without downtime?
✗ Incorrect
GSIs can be added anytime without downtime; LSIs cannot be added after creation.
Explain the main differences between Global Secondary Index (GSI) and Local Secondary Index (LSI) in DynamoDB.
Think about keys, timing of creation, and storage.
You got /5 concepts.
Describe when and why you would use a Global Secondary Index (GSI) versus a Local Secondary Index (LSI).
Consider query needs and index flexibility.
You got /4 concepts.