©
This document usesPHP Chinese website manualRelease
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>