Please note, this is a STATIC archive of website www.w3resource.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
w3resource

Redis HyperLogLog: PFMERGE

PFMERGE destkey sourcekey [sourcekey ...]

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.

Syntax:

PFMERGE KEY1 [email protected] KEYN

Available since

2.8.9.

Return Value

Simple string reply OK

Return Value Type

String

Example: Redis PFMERGE

redis 127.0.0.1:6379> PFADD hll1 foo bar zap a
(integer) 1
redis 127.0.0.1:6379> PFADD hll2 a b c foo
(integer) 1
redis 127.0.0.1:6379> PFMERGE hll3 hll1 hll2
OK
redis 127.0.0.1:6379> PFCOUNT hll3
(integer) 6

Previous: PFCOUNT
Next: Redis PubSub PSUBSCRIBE