Redis SortedSet DataType

  • Mix between Set and Hash data structure
  • Are implemented via a dual port data structure containing both a skip list and a hash table
  • Adding elements and retrieving sorted elements is extremely fast
  • Like hashes, sorted sets store
    • multiple fields called members and
    • their numerical values called scores
  • All the members are always unqiue, non repetative strings
  • They are ordered based on their scores
  • Sorted sets are used to store data that needs to be ranked, such as leadership and more
  • Like a hash single key stores multiple members.
  • The score of each member is a number

ZADD / ZRANGE / ZREVRANGE

ZINCRBY

Leave a Comment