You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using get_many to retrieve multiple keys at the same time. Surprisingly unlike set_many, it calls the Redis individually for each key in the list.
Is there a way to optimize this behavior?
The text was updated successfully, but these errors were encountered:
That's just a link to redis docs - I find their docs a bit tricky to connect to real world scenarios 😆. When I opened this issue I was more curious about django-redis.
It would be great to see more: e.g. links to the current source / explanation of the codepath for django-redis' implementation of that.
get_many (source here) uses MGET command which has a complexity of O(1) from django-redis perspective and a complexity of O(N), the complexity is all on redis side so if you are asking for many keys then it can be slow because of size of values and number of values.
While set_many (source here) just recently started using PIPELINE in order to improve total RTT.
Are you having issues reading many keys of writing?
To be honest I don't see a reason why it could be slow and a way to make it faster,
but I would be happy to be proven wrong.
I am using
get_many
to retrieve multiple keys at the same time. Surprisingly unlikeset_many
, it calls the Redis individually for each key in the list.Is there a way to optimize this behavior?
The text was updated successfully, but these errors were encountered: