dynamoDB GSI Flashcards

1
Q

What are the characteristics of a Global Secondary Index (GSI) in DynamoDB?

A
  • A GSI can be set up any time
  • a DynamoDB table can have up to 20 GSIs.
  • It acts as a secondary table with a different partition key and sort key from the base table.
  • Only projected attributes are available in a GSI
  • writes are made to the base table, then asynchronously replicated to the GSI.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the difference between a GSI and the base table in DynamoDB?

A

A GSI acts as a secondary table with its own partition key and sort key, and only projected attributes are available in a GSI.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How are writes handled in a Global Secondary Index (GSI)?

A

Writes are not made directly to the GSI; all writes are made to the base table and then asynchronously replicated to the GSI.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What consistency model do Global Secondary Indexes (GSIs) support?

A

GSIs only support the eventual consistency model.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the recommended provisioned write capacity for a GSI to avoid throttling?

A

To avoid potential throttling, provision equal to or double the write capacity for the GSI compared to the base table’s provisioned write capacity.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly