dynamoDB LSI Flashcards

1
Q

What are the restrictions on creating a Local Secondary Index (LSI) in DynamoDB?

A

You can only create an LSI during the creation of a table.

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

What is the key characteristic of an LSI in terms of its partition key?

A

An LSI always maintains the same partition key as the base table but has a different sort key.

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

How is an LSI created in DynamoDB?

A

When creating an LSI, you only need to provide the sort key and any attributes you’d like to project.

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

Is it possible to create an LSI on an existing table in DynamoDB?

A

No, creating an LSI on an existing table is not possible.

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

What capacity units are used by LSIs?

A

LSIs use capacity units from the base table.

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

What types of reads can you choose for LSIs?

A

You can choose strongly consistent or eventually consistent reads for LSIs.

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

What happens if you query an attribute not projected from the base table in an LSI?

A

DynamoDB will fetch this attribute from the base table, which is costly and should be avoided.

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