当前位置:网站首页>Redis hyperloglog cardinality statistics algorithm
Redis hyperloglog cardinality statistics algorithm
2022-06-13 03:56:00 【It's strange that the eyes are full of human fireworks】
Use software :redis
edition :2.8.9
effect : Add all element parameters to the... Stored at the variable name specified as the first parameter HyperLogLog In the data structure
HLL It has the following characteristics :
- The ability to use very little memory to count huge amounts of data , It just needs 12K Space can be counted 2^64 The data of ;
- There is a certain error in statistics , The error rate is low overall , The standard error is 0.81%;
- The error can be reduced by setting an auxiliary calculation factor .
Additive elements : This command supports adding one or more elements to HLL In structure .
127.0.0.1:6379> pfadd key "redis"
(integer) 1
127.0.0.1:6379> pfadd key "java" "sql"
(integer) 1
Count non repeating elements :
127.0.0.1:6379> pfadd key "redis"
(integer) 1
127.0.0.1:6379> pfadd key "sql"
(integer) 1
127.0.0.1:6379> pfadd key "redis"
(integer) 0
127.0.0.1:6379> pfcount key
(integer) 2
Merge one or more HLL To new structure :
127.0.0.1:6379> pfadd k "java" "sql"
(integer) 1
127.0.0.1:6379> pfadd k2 "redis" "sql"
(integer) 1
127.0.0.1:6379> pfmerge k3 k k2
OK
127.0.0.1:6379> pfcount k3
(integer) 3
边栏推荐
- 干预分析 + 伪回归
- 大五人格学习记录
- 双目视觉——打造室外避障的“最优解”
- 【测试开发】测试的相关基本概念
- Lambda终结操作reduce归并
- Jumpserver: user - system privileged user - Asset - authorization
- Translation of ego planner papers
- 谈谈激光雷达的波长
- How can a sweeping robot avoid obstacles without "mental retardation"? Analysis of five mainstream obstacle avoidance techniques
- [笔记]vs2015 编写汇编masm32之使用MASM32库
猜你喜欢
Field * doesn't have a default value problem
[note]vs2015 compilation of masm32 using MASM32 Library
[test development] fundamentals of software testing
单片机:PCF8591 应用程序
[test development] automated test selenium (III) -- unittest framework analysis
Introduction to MCU peripherals: temperature sensor DS18B20
不卷了!团队又一位成员离职了。。
【测试开发】自动化测试selenium(二)——webdriver常用的API
机器人避障系统基础
[MySQL] index and transaction
随机推荐
Lambda终结操作reduce归并
try-catch finally执行顺序的例题
5g China Unicom ap:b SMS ASCII transcoding requirements
无人机避障四种常见技术中,为何大疆首选双目视觉
【测试开发】进阶篇——各种测试技术分类
MCU: EEPROM multi byte read / write operation sequence
史上最详细的Swin-Transformer 掩码机制(mask of window attentation)————shaoshuai
单片机:NEC 协议红外遥控器
手机私有充电协议解读
MySQL 8.0 enables remote root user access and solves the problem of you are not allowed to create a user with Grant
环评图件制作-数据处理+图件制作
[test development] blog system - LoadRunner performance test (publish blog function benchmark test)
【ZeloEngine】本地化流程/ImGui中文化
Lambda end operation reduce merge
[MySQL] index and transaction
解答私信@田田WX //2022-6-12 C语言 51单片机LED模拟交通灯
【Web】Cookie 和 Session
Detailed explanation of MySQL storage process
Interpretation of usb-if bc1.2 charging protocol
[test development] file compression project practice