redis pfmerge命令

PFMERGE destkey sourcekey [sourcekey …]

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

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


Simple string reply: The command just returns OK.


redis>  PFADD hll1 foo bar zap a

(integer) 1

redis>  PFADD hll2 a b c foo

(integer) 1

redis>  PFMERGE hll3 hll1 hll2


redis>  PFCOUNT hll3

(integer) 6