https://serverless-stack.com/ logo
#help
Title
# help
d

Devin

12/22/2021, 10:24 PM
Earlier I was asking about DynamoDB and adding a GSI. With single table design, should there just generally be a handful of GSI’s and I may as well make them when I create the table if they have generic names like
gsi1
and so on?
k

Kujtim Hoxha

12/22/2021, 10:32 PM
You don't want to add more than you need, better add them over time
Depending on your projectionType adding 1 gsi basically means duplicating the amount of storage you use
A gsi is almost the same as a new table managed by aws
d

Devin

12/22/2021, 11:02 PM
fair enough. It just seemed kinda goofy to do this migration when I could have just made a handful to start with.
it’s important to learn this step anyway so I’m glad I’m doing it. And the table is small so no big deal
g

Garret Harp

12/23/2021, 4:24 AM
I add a few more gsi's than I use at the start since you can only add 1 index per deploy... and it wont use any extra data unless you actually store items with those gsi's. See screenshot:
k

Kujtim Hoxha

12/23/2021, 7:17 AM
Ah yeah Garret fair enough if you don't populate them with data it is practically the same