Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What are Sorted Sets useful for? #21

Open
nelsonic opened this issue Aug 15, 2015 · 2 comments
Open

What are Sorted Sets useful for? #21

nelsonic opened this issue Aug 15, 2015 · 2 comments

Comments

@nelsonic
Copy link
Member

Score/Leaderboards are a good use-case for Sorted Sets.
http://www.tutorialspoint.com/redis/redis_sorted_sets.htm
We are using them for ordering our Work Queue in arana.

@rjmk
Copy link

rjmk commented Aug 15, 2015

Could you use sorted sets to sort of pre-run a query?
Say you have a lot of products on your website and a lot of information about each product, but you often have to provide products within a price range. Could you duplicate some of the information about your products by having a zset with values equal to product ids (or something) and the scores being the values and be able to retrieve the relevant products quickly?

@nelsonic
Copy link
Member Author

that would be a creative (valid) use of a zset... 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants