I have a table with close to 2 billion rows already created in DynamoDB.
Due to a query requirement, I had to create a Global Secondary Index(GSI) in it. The process of GSI creation started 36 hours ago but still isn't completed. Portal shows Item Count to be around 100 million. So long way to go.
Questions:
Thanks.
Wait until the global secondary index has been created. This takes approximately 5 minutes. Check output of the following command.
You can create a GSI on creation or you can add it later. Different partition key as well as different sort key. It gives a completely different view of the data.
If you no longer need a global secondary index, you can delete it using the UpdateTable operation.
You can create a new GSI with a different name..
A GSI has its own WCUs and RCUs, distinct and separate to the primary index. Could this be because you dont have enough WCUs on your GSI?
If your global secondary index is taking too long to create (common when adding indexes on an existing large table), you can provision additional write capacity by following these steps:
Open the DynamoDB console.
From the navigation pane, choose Tables, and then select your table from the list.
Choose the Indexes tab.
Increase the write capacity of the index, and then choose Save.
After about a minute, check the OnlineIndexPercentageProgress metric from the Metrics tab to see if the creation of your global secondary index is progressing satisfactorily.
EDIT: Above from the AWS Knowledge Center
'OnlineIndexPercentageProgress' instructions:
Creation of your global secondary index will begin. You can monitor the progress on the Metrics tab:
Choose the Metrics tab.
Choose View all CloudWatch metrics.
In the CloudWatch console, choose DynamoDB. In the Search Metrics box, enter OnlineIndexPercentageProgress. Note: If the search returns an empty list, wait about a minute for metrics to populate.
Choose the name of the index to see the progress.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With