Redis Pfcount 命令

更新时间: 2019-07-07 15:54

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 命令

MongoDB

MongoDB

Kristina Chodorow / O'Reilly Media / 2013-5-23 / USD 39.99

How does MongoDB help you manage a huMONGOus amount of data collected through your web application? With this authoritative introduction, you'll learn the many advantages of using document-oriented da......一起来看看 《MongoDB》 这本书的介绍吧!

JSON 在线解析

JSON 在线解析

在线 JSON 格式化工具

RGB转16进制工具

RGB转16进制工具

RGB HEX 互转工具

URL 编码/解码

URL 编码/解码

URL 编码/解码