当前位置:网站首页>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.应用场景
- 排行榜系统(点赞数排行)
- 热点话题排行
边栏推荐
- List announced - outstanding intellectual property service team in China in 2021
- RTP 发送PS流零拷贝方案
- RT-Thread 堆区大小设置
- CGR 21 (D,E,F)
- Substrate 跨链技术源码级探索: XCVM的概览
- halcon知识:区域专题【07】
- 坚果云-在新电脑上同步移动硬盘的文件
- Niuke.com: minimum cost of climbing stairs
- Dart: string replace related methods to solve replacement characters
- POJ Project Summer
猜你喜欢

HMS Core音频编辑服务3D音频技术,助力打造沉浸式听觉盛宴

【Verilog基础】关于Clock信号的一些概念总结(clock setup/hold、clock tree、clock skew、clock latency、clock transition..)

More dragon lizard self-developed features! Production available Anolis OS 8.6 officially released

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

9:第三章:电商工程分析:4:【通用模块】;(待写……)

Carry two load balancing notes and find them in the future

dart:字符串replace相关的方法
![9: Chapter 3: e-commerce engineering analysis: 4: [general module]; (to be written...)](/img/96/cbed98ec69c952f1d231ce2ed25aab.png)
9: Chapter 3: e-commerce engineering analysis: 4: [general module]; (to be written...)

数据库系统概论习题册

坚果云-在新电脑上同步移动硬盘的文件
随机推荐
Tencent two sides: @bean and @component are used on the same class. What happens?
Rong Lianyun launched rphone based on Tongxin UOS to create a new ecology of localization contact center
Etcd教程 — 第八章 Etcd之Compact、Watch和Lease API
删除有序数组中的重复项 II[双指针--多情况统一]
List announced - outstanding intellectual property service team in China in 2021
STL教程7-set、pair对组和仿函数
Symantec electronic sprint technology innovation board: Tan Jian, the actual controller, is an American who plans to raise 620million yuan
[bjdctf2020]the mystery of ip|[ciscn2019 southeast China division]web11|ssti injection
备战数学建模35-时间序列预测模型
JS Es5 can also create constants?
药品管理系统加数据库,一夜做完,加报告
simpleITK读取nii遇到ITK only supports orthonormal direction cosines的错误
RT-Thread 堆區大小設置
Carry two load balancing notes and find them in the future
The meaning of linetypes enumeration values (line_4, line_8, line_aa) in opencv
[wechat applet] basic use of common components (view/scroll-view/wiper, text/rich-text, button/image)
为了使远程工作不受影响,我写了一个内部的聊天室 | 社区征文
IO stream_ recursion
AVIC UAV technology innovation board is listed: the fist product with a market value of 38.5 billion is pterodactyl UAV
数据库系统概论习题册