默认物理内存左小右大,不随命令发生变化
zadd k1 8 apple 2 banana 3 orange
zrange k1 0 -1 banana orange apple
zrange k1 0 -1 withscores banana 2 orange 3 apple 8
zrangebyscore k1 3 8 orange applezrange k1 0 1 banana orange
zrevrange k1 0 1 apple orange
zscore k1 apple 8 通过元素取出分值
zrank k1 apple 2 通过元素取出排名
zrange k1 0 -1 banana orange apple
zrange k1 0 -1 withscores banana 2 orange 3 apple 8
zincrby k1 2.5 banana 4.5
zrange k1 0 -1 withscores orange 3 banana 4.5 apple 8
zadd k1 80 s 60 ss 70 sss
zadd k2 60 s 100 ss 40 ssss
zunionstore unkey 2 k1 k2
zrange unkey 0 -1 withscores ssss 40 sss 70 s140 ss160
zunionstore unkey1 2 k1 k2 weights1 0.5
zrange unkey 0 -1 withscores ssss 20 sss 70 s110 s110
zunionstore unkey1 2 k1 k2 aggregate max
zrange unkey1 0 -1 withscores ssss 40 sss 70 s 80 ss 100
排序是怎么实现的增删改查的速度?skip list 跳跃表 平均值相对最优