您当前的位置: 首页 > 慢生活 > 程序人生 网站首页程序人生
Redis Pfcount 命令
发布时间:2021-11-08 23:39:51编辑:雪饮阅读()
Redis Pfcount 命令返回给定 HyperLogLog 的基数估算值。
返回值
整数,返回给定 HyperLogLog 的基数值,如果多个 HyperLogLog 则返回基数估值之和。
实例:
127.0.0.1:6379> flushdb
OK
127.0.0.1:6379> keys *
(empty list or set)
127.0.0.1:6379> pfadd key1 ele1 ele2
(integer) 1
127.0.0.1:6379> pfadd key1 ele3
(integer) 1
127.0.0.1:6379> pfadd key1 ele3
(integer) 0
127.0.0.1:6379> pfcount key1
(integer) 3
127.0.0.1:6379> pfadd key2 ele1 ele2 ele3
(integer) 1
127.0.0.1:6379> pfcount key1 key2
(integer) 3
127.0.0.1:6379> pfadd key3 ele4 ele3 ele5 ele2
(integer) 1
127.0.0.1:6379> pfcount key1 key2 key3
(integer) 5
关键字词:Redis,Pfcount
上一篇:Redis Pfadd 命令
下一篇:Redis PFMERGE 命令