当前位置:网站首页>redis数据结构分析
redis数据结构分析
2022-06-30 15:48:00 【我们一直在路上】
一、String
1.指令

2.底层数据结构
string 类型的数据结构 是SDS,是动态长度

根据你存储的字符串长度,来决定使用那个sds类型
3.应用场景
- 缓存应用
- 全局ID
- 限流(计数器限流) -> LUA
set limit:18075463454 1 60
incr limit: 18075463454 - 分布式session
二、List
1.指令

2.底层数据结构
存储结构



quickli 内部默认定义的单个 ziplist 的大小为 8k 字节. 超过这个大小,就会重新分配一个 ziplist 了。这个长度可以由参数list-max-ziplist-size来控制。
3.应用场景

三、Hash
1.指令

2.底层数据结构

3.应用场景
- 购物车
- 商品详情数据
- 用户信息
- 计数器
…
四、List
1.指令

2.底层数据结构

3.应用场景
用户标签
5、zset
1.指令

2.底层数据结构



节点的层数是随机的
3.应用场景
- 排行榜系统(点赞数排行)
- 热点话题排行
边栏推荐
- 中航无人机科创板上市:市值385亿 拳头产品是翼龙无人机
- 7 月 2 日邀你来TD Hero 线上发布会
- Data mining knowledge points sorting (final review version)
- Bidding announcement: remote disaster recovery project of Shenzhen Finance Bureau database
- [bjdctf2020]the mystery of ip|[ciscn2019 southeast China division]web11|ssti injection
- [Demo] 循环写文件
- 删除有序数组中的重复项 II[双指针--多情况统一]
- 容联云首发基于统信UOS的Rphone,打造国产化联络中心新生态
- Niuke.com: minimum cost of climbing stairs
- AVIC UAV technology innovation board is listed: the fist product with a market value of 38.5 billion is pterodactyl UAV
猜你喜欢

Installing jupyter notebook under Anaconda

中航无人机科创板上市:市值385亿 拳头产品是翼龙无人机

容联云首发基于统信UOS的Rphone,打造国产化联络中心新生态

备战数学建模36-时间序列模型2

Li Zexiang, a legendary Chinese professor, is making unicorns in batches

The 25th anniversary of Hong Kong's return to China the Hong Kong Palace Museum officially opened as a new cultural landmark

7 月 2 日邀你来TD Hero 线上发布会

HMS core audio editing service 3D audio technology helps create an immersive auditory feast

Anaconda下安装Jupyter notebook

IO流_递归
随机推荐
Mathematical modeling for war preparation 36 time series model 2
利用PIL进行不失真的resize
halcon知识:矩阵专题【02】
[wechat applet] the hosting environment of the applet
Good partner for cloud skill improvement, senior brother cloud of Amazon officially opened today
HMS core audio editing service 3D audio technology helps create an immersive auditory feast
CGR 21 (D,E,F)
八大基本排序(详解)
Mathematical modeling for war preparation 34-bp neural network prediction 2
STL tutorial 7-set, pair pair pair group and functor
Hologres共享集群助力淘宝订阅极致精细化运营
新茶饮“死去活来”,供应商却“盆满钵满”?
MC Instruction Decoder
RTP 发送PS流零拷贝方案
Undistorted resize using pil
数据库系统概论习题册
附加:(还没写,别看~~~)WebMvcConfigurer接口;
On July 2, I invited you to TD Hero online conference
RT thread heap size Setting
Go micro tutorial - Chapter 1 getting started