Lakshmi
Lakshmi

Reputation: 11

How to do pagination in aws dax when data is more than 1 MB for the given query key

I am trying to read data from aws dax where the data is more than 1 MB for the given query key. How does the pagination works in this scenario!? I am not seeing much performance improvememt when data is more than 1 MB with respect to dax. Some suggestions would be appreciated!!!

Upvotes: -1

Views: 164

Answers (1)

Leeroy Hannigan
Leeroy Hannigan

Reputation: 19873

DAX has 2 caches, an Item and a Query cache.

The Item cache caches individual items based on their key.

The Query cache caches multiple items and the key is the request parameters as a whole. This cache serves both Query and Scan requests.

So when you make a paginated Scan, every page has a new ExclusiveStartKey and that is part of the cache key.

So if you make identical Scan requests with the number of items, ensuring the same ExclusiveStartKey per page, same FilterExpression, Limit etc... then you will make use of the Query cache, otherwise you'll be served by DynamoDB.

Upvotes: 1

Related Questions