当前位置:网站首页>Redis (V) - advanced data types
Redis (V) - advanced data types
2022-06-30 18:02:00 【Zhaoliwen is a pig】
Redis( 5、 ... and )—— Advanced data types
List of articles
1、Bitmaps
Basic operation
Get specified key Corresponding to... On the offset bit value
getbit key offsetSet the specified key Corresponding to... On the offset bit value ,value Can only be 1 or 0
setbit key offset value
Extended operation
Specify key Hand in by position 、 and 、 Not 、 Exclusive or operation , And the result Save to destKey in
bitop op destKey key1 [key2...]- and: hand over
- or: and
- not: Not
- xor: Exclusive or
Specify Statistics key in 1 The number of
bitcount key [start end]
2、HyperLogLog
base
- Cardinality is the data set Number of elements after de duplication
- HyperLogLog It is used for cardinality Statistics , Use of the LogLog The algorithm of
Basic operation
Add data
pfadd key element1, element2...statistics
pfcount key1 key2....Merge data
pfmerge destkey sourcekey [sourcekey...]
Related instructions
- Used for cardinal Statistics , It's not a collection , Don't save data , Just record the quantity, not the specific data
- The core is the cardinality estimation algorithm , Final value There are some errors
- Error range : The result of cardinality estimation is a function with 0.81% Approximate value of standard error
- Minimal space consumption , Every hyperloglog key Occupied 12K Memory used to mark cardinality
- pfadd Command is not a one-time assignment 12K Memory usage , As the cardinality increases, memory Gradually increase
- Pfmerge command Occupied after consolidation The storage space of is 12K, Regardless of the amount of data before merging
3、GEO
Basic operation
Add coordinate points
geoadd key longitude latitude member [longitude latitude member ...] georadius key longitude latitude radius m|km|ft|mi [withcoord] [withdist] [withhash] [count count]Get coordinate points
geopos key member [member ...] georadiusbymember key member radius m|km|ft|mi [withcoord] [withdist] [withhash] [count count]Calculate the distance between coordinate points
geodist key member1 member2 [unit] geohash key member [member ...]
边栏推荐
- Babbitt | yuanuniverse daily must read: minors ask for a refund after a reward. The virtual anchor says he is a big wrongdoer. How do you think of this regulatory loophole
- svg实现的订票UI效果
- .NET ORM框架HiSql实战-第一章-集成HiSql
- 新技能:通过代码缓存加速 Node.js 的启动
- Write the simplest small program in C language Hello World
- 【剑指Offer】53 - I. 在排序数组中查找数字 I
- Apache parsing vulnerability (cve-2017-15715)_ Vulnerability recurrence
- leetcode:1042. Do not plant flowers adjacent to each other [randomly fill in qualified + no contradiction will be formed behind + set.pop]
- Map collection
- Parker variable displacement piston pump pv092r1k1t1nmmc
猜你喜欢

Booking UI effect implemented by svg

Small tools (3) integration knife4j3.0.3 interface document

Apache 解析漏洞(CVE-2017-15715)_漏洞复现

IEEE TBD SCI影响因子提升至4.271,位列Q1区!

Parker variable displacement piston pump pv092r1k1t1nmmc

TFTP下载kernel,nfs挂载文件系统

Spin lock exploration

Write the simplest small program in C language Hello World

水平视觉错误效果js特效代码

构建基本buildroot文件系统
随机推荐
NFT: 开启加密艺术时代的无限可能
Inventory in the first half of 2022: summary of major updates and technical points of 20+ mainstream databases
【义修换届大礼包】
Add code block in word (Reprint)
【剑指Offer】52. 两个链表的第一个公共节点
IEEE TBD SCI impact factor increased to 4.271, ranking Q1!
联想“双平台”运维解决方案 助力智慧医疗行业智慧管理能力全面提升
Nielseniq welcomes dawn E. Norvell, head of retail lab, to accelerate the expansion of global retail strategy
Key to understanding the trend of spot Silver
Combination of applet container and Internet of things
canvas鼠标控制重力js特效
MSF后渗透总结
Six photos vous montrent pourquoi TCP serre la main trois fois?
Development: how to install offline MySQL in Linux system?
Tubes响应性数据系统的设计与原理
[bjdctf2020]the mystery of ip|[ciscn2019 southeast China division]web11|ssti injection
自旋锁探秘
JS from prototype chain to inheritance
[machine learning] K-means clustering analysis
Word中添加代码块(转载)
