HyperLogLog的一个重要作用就是 计数 + 去重, 尤其适合做 UV 统计
HyperLogLog提供不精确的计数方案,标准误差 0.81%
127.0.0.1:6379> pfadd students lizhe
(integer) 1
127.0.0.1:6379> pfadd students lizhe
(integer) 0
127.0.0.1:6379> pfadd students lizhe
(integer) 0
127.0.0.1:6379> pfadd students Jon
(integer) 1
127.0.0.1:6379> pfadd students Jon
(integer) 0
127.0.0.1:6379> pfcount students
(integer) 2
127.0.0.1:6379>