当前位置:网站首页>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 ...]
边栏推荐
- 【剑指Offer】52. 两个链表的第一个公共节点
- 2022上半年盘点:20+主流数据库重大更新及技术要点汇总
- ABAP publish restful service
- IEEE TBD SCI impact factor increased to 4.271, ranking Q1!
- Generate confrontation network, from dcgan to stylegan, pixel2pixel, face generation and image translation.
- K-line diagram must be read for quick start
- 网络:服务器网卡组技术原理与实践
- 墨天轮沙龙 | 清华乔嘉林:Apache IoTDB,源于清华,建设开源生态之路
- [Netease Yunxin] playback demo build: unable to convert parameter 1 from "asyncmodalrunner *" to "std:: nullptr\u T"**
- MSF后渗透总结
猜你喜欢

New skill: accelerate node through code cache JS startup

Write the simplest small program in C language Hello World

编译生成busybox文件系统

每日面试1题-如何防止CDN防护被绕过

Hyper-v:在虚拟网络中启用 SR-IOV

Post penetration file system + uploading and downloading files

Nft: unlimited possibilities to open the era of encryption Art

Daily interview 1 question - basic interview question of blue team - emergency response (1) basic idea process of emergency response +windows intrusion screening idea

6 張圖帶你搞懂 TCP 為什麼是三次握手?

TFTP下载kernel,nfs挂载文件系统
随机推荐
MOOG servo valve d661-4577c
Radio and television 5g officially set sail, attracting attention on how to apply the golden band
Post penetration file system + uploading and downloading files
Map collection
Distributed machine learning: model average Ma and elastic average easgd (pyspark)
Tencent cloud installs MySQL database
The new version of Shangding cloud | favorites function has been launched to meet personal use needs
leetcode:1042. Do not plant flowers adjacent to each other [randomly fill in qualified + no contradiction will be formed behind + set.pop]
应届生毕业之后先就业还是先择业?
China Infrastructure Development Association: electronic contract is recommended
中基协:推荐使用电子合同
Rexroth hydraulic control check valve z2s10-1-3x/
网络:服务器网卡组技术原理与实践
Six pictures show you why TCP has three handshakes?
Mo Tianlun salon | Tsinghua qiaojialin: Apache iotdb, originated from Tsinghua, is building an open source ecological road
Exch: database integrity checking
[零基础学IoT Pwn] 环境搭建
6 張圖帶你搞懂 TCP 為什麼是三次握手?
Animesr: learnable degradation operator and new real world animation VSR dataset
【二叉树】前序遍历构造二叉搜索树
