redis hash list set zset 的对比和使用

# 速度

# 遍历速度

Set = list > hash

# 插入删除速度

Hash = set > list

# 随机访问速度

hash = list > set

# 重复

list 有序可重复,存入顺序和取出顺序完全相同
set 无序不可重复,存入的顺序和取出的顺序不一定一致 会自动去重
zset 有序
hash key不可重复,value可以重复

Licensed under CC BY-NC-SA 4.0
comments powered by Disqus
使用 Hugo 构建
主题 StackJimmy 设计