当前位置:网站首页>Redis顺序排序命令
Redis顺序排序命令
2022-06-26 15:50:00 【华为云】
Redis顺序排序命令
redis> LPUSH today_cost 30 1.5 10 8(integer) 4# 排序redis> SORT today_cost1) "1.5"2) "8"3) "10"4) "30"排序键指示理论是设立一个和戒指的下表宽度相近的链表,链表的每个项都是再分派目标构造,根据分类法指示的模块有所不同再分派目标的构造也有所不同
管理器是
typedef struct _redisSortObject { robj *obj; union { double score; robj *cmpobj; } u;} redisSortObject;obj指向确切的下表元素值,分数值是列表项的数值的浮点,然后根据积分的数值对链表展开字符尺寸的顺序,然后将顺序之后的结论回到给顾客端
其他选项模块展开顺序
分类法指示管理器按字符展开顺序,需字符串值的键排序的时,插入阿尔法选项
asc选项是升序,desc选项是降序,limit选项是对排序后的结果进行限制,by选项是可以按照某些字符串的键或者哈希键包含的域作为元素的权重来进行排序,get选项是根据排序结果取出相应的键值,store选项是对排序结果进行保存到指定的键中
指示模块的次序
这几个选项的执行顺序先是排序,然后是limit选项,限制排序结果长度,然后是get选项获取外部键,然后是store选项进行结果集的保存。
除了接到指示之外,其他指示模块的先后顺序对结果集没冲击
好了,今天内容主要讲解了一下redis的sort排序指令以及它的各个参数,比如asc选项是升序的意思,desc降序,limit对排序后的结果限制,by选项按照字符串的键权重排序,get选项从结果出取出相应的键值,store选项是将排序结果保存到指定键,sort key命令原理是创建一个和key的列表长度相同的数组,数组的每个项都是redisSortObject结构,根据sort命令的选项不同redisSortObject的结构也不同。
️ 感谢大家
如果你觉得这篇内容对你挺有有帮助的话:
- 欢迎关注我️,点赞,评论,转发
- 关注
盼盼小课堂,定期为你推送好文,还有群聊不定期抽奖活动,可以畅所欲言,与大神们一起交流,一起学习。 - 有不当之处欢迎批评指正。
边栏推荐
- Anaconda3安装tensorflow 2.0版本cpu和gpu安装,Win10系统
- Why are encoder and decoder structures often used in image segmentation tasks?
- What is the process of switching C # read / write files from user mode to kernel mode?
- Stepn novice introduction and advanced
- 8 自定义评估函数
- [untitled]
- Failed to get convolution algorithm. This is probably because cuDNN failed to initialize
- NFT交易原理分析(1)
- IAR工程适配GD32芯片
- IntelliJ idea -- Method for formatting SQL files
猜你喜欢

Anaconda3安装tensorflow 2.0版本cpu和gpu安装,Win10系统

Quickly get started with federal learning -- the practice of Tencent's self-developed federal learning platform powerfl

NFT 平台安全指南(1)

C# 读写文件从用户态切到内核态,到底是个什么流程?

大话领域驱动设计——表示层及其他

还存在过有键盘的kindle?

The first batch in the industry! Tencent cloud security and privacy computing products based on angel powerfl passed CFCA evaluation

3 keras版本模型训练

『C语言』题集 of ⑩

Handwritten numeral recognition, run your own picture with the saved model
随机推荐
Nanopi duo2 connection WiFi
油田勘探问题
How to configure and use the new single line lidar
C. Inversion Graph
NFT 平台安全指南(1)
golang 临时对象池优化
Selenium saves elements as pictures
【leetcode】331. Verifying the preorder serialization of a binary tree
Leetcode one week race 298, first three questions
IntelliJ idea -- Method for formatting SQL files
When a project with cmake is cross compiled to a link, an error cannot be found So dynamic library file
零知识 QAP 问题的转化
Golang 1.18 go work usage
JS creative icon navigation menu switch background color
Summary of data interface API used in word search and translation applications
Development, deployment and online process of NFT project (2)
01 backpack DP
IAR工程适配GD32芯片
5 model saving and loading
AUTO sharding policy will apply DATA sharding policy as it failed to apply FILE sharding policy