Net Core project that using DynamoDB
. They have ScanAsync
and QueryAsync
. I have no problem using ScanAsync
but I read that the performance of Query is better so I want to use QueryAsync
instead. I set up indexes with both Partition and Short Key. But I can only find the way to query with Partition key - not both.
Can someone help me with that?
For example I have a table called "Slot" with: Id, StaffId, WorkDate...which I created index with StaffId is Partition key and WorkDate is Short Key and the index called "StaffId-WorkDate-index"
Here is the only way I can find but can only use for "StaffId-index":
await QueryAsync<T>(StaffId, new DynamoDBOperationConfig { IndexName = "StaffId-index", ConsistentRead = false, QueryFilter = scanConditions }).GetRemainingAsync();
I expect I can using query for "StaffId-WorkDate-index". Thank youenter code here