Reputation: 1
I have a amazon-dynamodb table with millions of records, I have perfomred Query operation by knowing primary keys (Sort+ Partition), But I want to implement FilterExpression on attribute , I have applied local index on that attribute, Will this index help to retrieve in above Query scenario
Upvotes: 0
Views: 37
Reputation: 23783
No.
DDB is not an RDBMS...it can't combine two indexes to limit the records read.
FilterExpression is applied after the records are read by Query using your specified table or index.
FilterExpression just narrrows down what is returned, not what is read. So your RCU consumed (and thus the performance) will remain the same with or without it.
Can't you Query using the local index that has that attribute?
Upvotes: 2