Redis Sorted Sets Explained

Sdílet
Vložit
  • čas přidán 21. 07. 2021
  • Sorted Sets are a tool every developer should know. In this explainer, we’ll introduce you to the most common Sorted Set commands, including ZADD, ZINCRBY, ZRANGE, and ZRANK. We’ll also show you how to use Redis Sorted Sets to maintain an online gaming leaderboard!
    Links:
    Redis University → university.redislabs.com/
    Redis Labs → www.redislabs.com/
    Redis.io Sorted Set Documentation → redis.io/topics/data-types#so...
    Need a Redis cluster now? Sign up for a free Redis Cloud Essentials account → bit.ly/2wasiCa
    Join our discord server → / discord
  • Věda a technologie

Komentáře • 22

  • @Redisinc
    @Redisinc  Před 2 lety +4

    Hello, there is a slight error in one part of the video. ZREVRANGE will traverse a sorted set from highest to lowest score values. The output we see at 3:53 is incorrect. The list should be inverted or in 'descending' order. Sorry about that! - Justin

    • @candrabeqx
      @candrabeqx Před rokem

      wait, but the output at 3:53 is sorted in descending order which is correct.

    • @J-wd2cx
      @J-wd2cx Před rokem

      I think he meant here 3:23

    • @osifoanosike6565
      @osifoanosike6565 Před 10 měsíci

      @@J-wd2cx that also confused me for a bit, but I realized that the difference was denoted using the direction of the arrow.

    • @yelnil
      @yelnil Před měsícem

      how come you set WITHSCORES in the command but it’s only the IDs are showing?

  • @nikitapodshivalov3573
    @nikitapodshivalov3573 Před 2 lety +9

    You should promote the editor of this video. It is a masterpiece ;)

  • @azizutkuozdemir
    @azizutkuozdemir Před 2 lety +3

    I like almost everything about redis and the people working for redis.

  • @FuckUsNew
    @FuckUsNew Před 2 lety +6

    Wow, the best tutorial made by creator I've ever seen!

  • @vanshchopra24
    @vanshchopra24 Před 6 měsíci +1

    Thanks for the video!!

  • @larryquantz195
    @larryquantz195 Před rokem +3

    This is a really well-made video and the technical explanations are terrific. And I'm not even into Dungeons and Dragons or Elden Ring!

    • @Redisinc
      @Redisinc  Před rokem +1

      Thanks! We're all a bit nerdy on the DevRel team so this came naturally to us. - Justin

  • @ahxel
    @ahxel Před rokem

    now I wanna play Mages and Minotaurs!
    seriously, though, great tutorial video.

  • @as5547
    @as5547 Před rokem +2

    I am a newbie, how did you paste the list of 11 values with the correct tabs, and the command did not execute after the first set of values. Thanks

    • @Redisinc
      @Redisinc  Před rokem

      That was a bit of movie magic. We use a script to "type" for us so it doesn't show typos. In truth it was just a very long string with a lot of spaces.

  • @Naru1243
    @Naru1243 Před 2 lety

    These Videos really deserve more views. q.q

  • @KanikaDawar1997
    @KanikaDawar1997 Před rokem +1

    How can I add high precision values, like double in a sorted set?

    • @Redisinc
      @Redisinc  Před rokem

      You can add doubles as a score to members in a Redis Sorted Set.

  • @glennedgar5057
    @glennedgar5057 Před 3 lety +1

    good set of videos. a question about last video on hashes. Redis does not have a native facility to handle an array of hash tables. there are adhoc mechanisms and a module dbx.
    what is the semi official way to handle an array of redis hash tables?...
    Thanks

    • @Redisinc
      @Redisinc  Před 2 lety

      Great question! There is no real way to store an array of hash data types in open source Redis. If you have multiple hashes within an array on your client and would like to store them in a similar fashion within Redis, you could have all Redis key names store a list name within their value, like ':' where array_name is the name of the array of hashes and the index is the position of the hash. You can then run the SCAN command to pull all hashes that match your array_name value. This can get pretty costly though; it might be worth checking out the RedisJSON module. You can store an array of JSON objects in Redis without a problem.

    • @enimozhianv2880
      @enimozhianv2880 Před 2 lety

      @@Redisinc Facing performance issues when using scan command. Could you please help how to overcome it

  • @bovineox1111
    @bovineox1111 Před rokem

    You had me at mages and minotaurs

    • @Redisinc
      @Redisinc  Před rokem +1

      Another proud warrior joins our merry band!