当前位置:网站首页>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 ...]
边栏推荐
猜你喜欢

Cloud practice of key business migration of Internet of things by well-known Internet housing rental service companies

Send the injured baby for emergency medical treatment. Didi's driver ran five red lights in a row

Canvas cloud shape animation

NFT: 开启加密艺术时代的无限可能
![[Architecture] 1366- how to draw an excellent architecture diagram](/img/98/5dc29e08e91e751f67d910fadc6430.jpg)
[Architecture] 1366- how to draw an excellent architecture diagram

Importing alicloud ECS locally to solve deployment problems

港科大&MSRA新研究:关于图像到图像转换,Finetuning is all you need

Parker variable displacement piston pump pv092r1k1t1nmmc

Horizontal visual error effect JS special effect code

如何写一个技术方案
随机推荐
svg实现的订票UI效果
Exch:exchange server 2013 is about to end support
大文件处理(上传,下载)思考
IEEE TBD SCI影响因子提升至4.271,位列Q1区!
2022上半年盘点:20+主流数据库重大更新及技术要点汇总
Shortcut keys for the rainbow brackets plug-in
DeFi借贷协议机制对比:Euler、Compound、Aave和Rari Capital
Canvas cloud shape animation
Tencent cloud installs MySQL database
Develop those things: how to add text watermarks to videos?
What did Tongji and Ali study in the CVPR 2022 best student thesis award? This is an interpretation of yizuo
Vue3 reactive database
TFTP download kernel, NFS mount file system
Key to understanding the trend of spot Silver
A tough battle for Tencent cloud
Six photos vous montrent pourquoi TCP serre la main trois fois?
巴比特 | 元宇宙每日必读:未成年人打赏后要求退款,虚拟主播称自己是大冤种,怎么看待这个监管漏洞?...
Splitting. JS text title slow loading JS effect
Post penetration file system + uploading and downloading files
MOOG servo valve d661-4577c
