Latest web development tutorials

Redis Pfadd command

Redis HyperLogLog

Redis Pfadd command adds all the elements of parameters to HyperLogLog data structure.

grammar

redis Pfadd basic command syntax is as follows:

redis 127.0.0.1:6379> PFADD key element [element ...]

Available versions

> = 2.8.9

return value

Integer, if there is at least one element is added returns 1, otherwise it returns 0.

Examples

redis 127.0.0.1:6379> PFADD mykey a b c d e f g h i j
(integer) 1
redis 127.0.0.1:6379> PFCOUNT mykey
(integer) 10

Redis HyperLogLog