Questions tagged [amazon-dynamodb-index]
251 questions
25
votes
4 answers
com.amazonaws.services.dynamodbv2.model.AmazonDynamoDBException: Cannot read from backfilling global secondary index
We keep getting this exception in our app which has a scheduled job to read on a gloabl secondary index. Looks like it keeps backfilling periodically even though there were no changes on the table. The volumes on our table are quite low so a bit…

Sateesh
- 273
- 1
- 3
- 5
7
votes
2 answers
DynamoDB how to use index in PartiQL queries?
I have seen the dynamoDB doc for the PartiQL syntax:
SELECT expression [, ...]
FROM table[.index]
[ WHERE condition ] [ [ORDER BY key [DESC|ASC] , ...]
but in practice:
select * from dev .pk-all-index
where "pk" = 'config' AND ("brand" = 'tesla'…

fred_
- 1,486
- 1
- 19
- 31
7
votes
1 answer
DynamoDB queries on secondary index, how to define the indexes
I've been going around and around this and it's just not clear what to do.
I have a simple table where I want to make queries against several columns. As I understand it, that means creating a secondary index for each column there is to query…

David Herron
- 898
- 2
- 12
- 22
6
votes
3 answers
When and how is a Dynamodb GSI having a Partition Key and Sort Key partitioned?
When and how is a Dynamodb GSI having a Partition Key and Sort Key partitioned?
Is there a maximum size limit on GSI Partitions like table partitions?
If yes then what happens when a uni-cardinal GSI (i.e. GSI having the same partition key across…

lalatnayak
- 160
- 1
- 6
- 21
5
votes
2 answers
Cost of adding a Global secondary Index to an existing DynamoDB Table
There is an existing table in DynamoDB with few billion records and I want to add a Global Secondary Index (GSI) to it. Does this consume any Read Request Units (RRU) from the table capacity OR a Write Request Units (WRU) for the index. I am…

Prayag Sagar
- 651
- 1
- 8
- 21
4
votes
1 answer
How to remove the sort key of a table in dynamodb
I am stuck with removing sort key in dynamodb table.
I need to know via AWS console UI or command line.
Thanks!

Nilotpal
- 3,237
- 4
- 34
- 56
4
votes
0 answers
Dynamo DB Projecting additional attributes in existing GSI having billions of data
I have a dynamo db table having almost a billion records in it. It has 4 different GSI. I need to project few more attributes to one of the GSI. What is the best approach to do so?
I thought two options:
Delete the GSI where I want to project…

Jacob
- 420
- 5
- 15
4
votes
1 answer
AWS BatchGetItem vs GetItem in parallel
Is there much difference (in time performance) in using BatchGetItem vs issuing several GetItem in parallel?
My code will be cleaner if I can use GetItem and just handle the parallelisation myself.
However, if there's a definite time performance…

Lawrence Wagerfield
- 6,471
- 5
- 42
- 84
4
votes
3 answers
Should I make this field a GSI, a regular attribute, or something else in order to have efficient queries?
For my DynamoDB table, I currently have a schema like this:
Partition key - Unique ID, so every item has a completely unique ID
Sort key - none
Attribute - JSON that contains some values
Now, I want to add a new field that will be required for every…

EMS
- 71
- 3
4
votes
1 answer
DynamoDB global index overloading vs sparse indexes
We are designing an application which will use DynamoDB as storage system.
We identified the different access patterns and after reviewing Global Secondary Indexes documentation, we got stuck on making a decision about which approach to use: Index…

Alberto Martin
- 556
- 4
- 8
4
votes
0 answers
DynamoDb querying with geo-spatial data (Local Secondary Index) AND foreign keys saved as range key
I'm trying to construct a DynamoDb table supporting these 3 access patterns:
Access list of institutions within XX radius of a given zip code.
Access list of institutions within XX radius of a given zip code for a given education level (4-year,…

Tom Schreck
- 5,177
- 12
- 68
- 122
4
votes
2 answers
Query a Secondary Index on DynamoDB in Golang
My primary key is a field called "id"
I've added a secondary index to my table on the field "group_number"
I query via the secondary index like so:
// Query the secondary index
queryInput := &dynamodb.QueryInput{
TableName:…

user1053263
- 722
- 2
- 16
- 33
3
votes
1 answer
GSI capacity mode will be on-demand when primary Table has on-demand capacity mode?
GSI capacity mode will be on-demand when primary Table has on-demand capacity mode?
I am not able to find this information on the AWS documentation. Though what I am able to find is: RCU and WCU(provisioned capacity mode) should be same(or more) for…

lowLatency
- 5,534
- 12
- 44
- 70
3
votes
1 answer
At what point do you need more than one table in dynamodb?
I am working on an asset tracking system that also manages the concept of "projects". The users of this application perform maintenance activities on their customer's assets, so they need an action log where actions on an asset start life as a task…

Mike Nishizawa
- 1,410
- 1
- 14
- 14
3
votes
2 answers
How to sort DynamoDB table by a single column?
I'd like to list records from my DDB table ordered by creation date.
My table has an attribute DateCreated.
All examples I can find describe ordering within some partition.
But I want global ordering.
Am I supposed to create an artificial attribute…

Roman
- 64,384
- 92
- 238
- 332