当前位置:网站首页>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 offset
Set 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 ...]
边栏推荐
- MIT科技评论2022年35岁以下创新者名单发布,含AlphaFold作者等
- TFTP download kernel, NFS mount file system
- A tough battle for Tencent cloud
- K-line diagram must be read for quick start
- Send the injured baby for emergency medical treatment. Didi's driver ran five red lights in a row
- NFT: 开启加密艺术时代的无限可能
- 【机器学习】K-means聚类分析
- splitting. JS password display hidden JS effect
- Plane intersection and plane equation
- Ten thousand volumes - list sorting [01]
猜你喜欢
vue3 响应式数据库—— reactive
Share 5 commonly used feature selection methods, and you must see them when you get started with machine learning!!!
巴比特 | 元宇宙每日必读:未成年人打赏后要求退款,虚拟主播称自己是大冤种,怎么看待这个监管漏洞?...
Send the injured baby for emergency medical treatment. Didi's driver ran five red lights in a row
[零基础学IoT Pwn] 环境搭建
Write the simplest small program in C language Hello World
送受伤婴儿紧急就医,滴滴司机连闯五个红灯
AnimeSR:可学习的降质算子与新的真实世界动漫VSR数据集
A tough battle for Tencent cloud
4年工作经验,多线程间的5种通信方式都说不出来,你敢信?
随机推荐
知名互联网房屋租赁服务公司物联网关键业务迁移上云实践
Daily interview 1 question - how to prevent CDN protection from being bypassed
Exch:修复丢失的系统邮箱
leetcode:787. The cheapest transfer flight in station K [k-step shortest path + DFS memory + defaultdict (dict)]
[sword finger offer] sword finger offer 53 - ii Missing numbers from 0 to n-1
Is there an optimal solution to the energy consumption anxiety in the data center?
Parker variable displacement piston pump pv092r1k1t1nmmc
Develop those things: how to add text watermarks to videos?
生成对抗网络,从DCGAN到StyleGAN、pixel2pixel,人脸生成和图像翻译。
6 张图带你搞懂 TCP 为什么是三次握手?
自旋锁探秘
Tencent cloud installs MySQL database
Canvas mouse control gravity JS effect
广电5G正式启航,黄金频段将如何应用引关注
Hyper-v:在虚拟网络中启用 SR-IOV
vue3 响应式数据库—— reactive
New skill: accelerate node through code cache JS startup
Parker Parker sensor p8s-grflx
4年工作经验,多线程间的5种通信方式都说不出来,你敢信?
Exch:完整性检查 Database Integrity Checking