修改本页

Redis 命令 客户端 文档 社区 下载 问题 支持 许可

PFMERGE destkey sourcekey [sourcekey …]

相关命令

Available since 2.8.9.

时间复杂度: O(N) to merge N HyperLogLogs, but with high constant times.

Merge multiple HyperLogLog values into an unique value that will approximate the cardinality of the union of the observed Sets of the source HyperLogLog structures.

The computed merged HyperLogLog is set to the destination variable, which is created if does not exist (defauling to an empty HyperLogLog).

返回值

Simple string reply: The command just returns OK.

例子

redis> PFADD hll1 foo bar zap a

  1. (integer) 1

redis> PFADD hll2 a b c foo

  1. (integer) 1

redis> PFMERGE hll3 hll1 hll2

  1. OK

redis> PFCOUNT hll3

  1. (integer) 6
redis>

Comments powered by Disqus

This website is open source software developed by Citrusbyte.

The Redis logo was designed by Carlos Prioglio. See more credits.

Sponsored by Redis Support