Comando Redis Pfcount
El comando Redis Pfcount devuelve la estimación de cardinalidad de un HyperLogLog dado.
Sintaxis
La sintaxis básica del comando redis Pfcount es la siguiente:
redis 127.0.0.1:6379> PFCOUNT key [key ...]
Versiones disponibles
>= 2.8.9
Valor de retorno
Entero. Devuelve el valor de cardinalidad del HyperLogLog dado; si hay varios HyperLogLog, devuelve la suma de las estimaciones de cardinalidad.
Ejemplo
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>
Otras extensiones