PFMERGE command in redis

PFMERGE destkey sourcekey [sourcekey ...]

Merges N different HyperLogLogs into a single one.

Redis PFMERGE command is used to merge multiple HyperLogLog values into a unique value that will approximate the cardinality of the union of the observed sets of the source HyperLogLog structures.

RETURN VALUE

Simple string reply OK.

Syntax:

PFMERGE destkey sourcekey [sourcekey ...]

Example

redis:6379> PFADD mykey a b c d e f g h
(integer) 1
redis:6379> PFADD mykey1 hello redis tutorial
(integer) 1
redis:6379> PFMERGE dstkey mykey mykey1
"OK"

Output

OK


No comments:

Post a Comment