Easy Tutorial
❮ Sets Sadd Lists Lrem ❯

Redis Pfadd Command

Redis HyperLogLog

The Redis Pfadd command adds all element parameters to the HyperLogLog data structure.

Syntax

The basic syntax for the redis Pfadd command is as follows:

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

Available Versions

= 2.8.9

Return Value

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

Example

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

❮ Sets Sadd Lists Lrem ❯