Redis参考手册
Redis Pfcount 命令
Redis Pfcount 命令
Redis Pfcount 命令
Redis HyperLogLog
Redis Pfcount 命令返回给定 HyperLogLog 的基数估算值。
语法
redis Pfcount 命令基本语法如下:
redis 127.0.0.1:6379> PFCOUNT key [key ...]
可用版本
>= 2.8.9
返回值
整数,返回给定 HyperLogLog 的基数值,如果多个 HyperLogLog 则返回基数估值之和。
实例
redis 127.0.0.1:6379> PFADD hll foo bar zap (integer) 1 redis 127.0.0.1:6379> PFADD hll zap zap zap (integer) 0 redis 127.0.0.1:6379> PFADD hll foo bar (integer) 0 redis 127.0.0.1:6379> PFCOUNT hll (integer) 3 redis 127.0.0.1:6379> PFADD some-other-hll 1 2 3 (integer) 1 redis 127.0.0.1:6379> PFCOUNT hll some-other-hll (integer) 6 redis>
Redis HyperLogLog
Redis Pfcount 命令 |
---|
Redis 是一个开源的使用 ANSI C 语言编写、遵守 BSD 协议、支持网络、可基于内存亦可持久化的日志型、Key-Value 数据库,并提供多种语言的 API。 它通常被称为数据结构服务器,因为值( value )可以是 字符串( String ), 哈希(Map),列表(list),集合( sets ) 和 有序集合( sorted sets )等类型。
主页 | https://redis.io/ |
源码 | https://github.com/antirez/redis |
发布版本 | 4.0.2 |