English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Redis Pfadd Command

Redis HyperLogLog

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

Syntax

Basic Syntax of Redis Pfadd Command

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

Available Version

>= 2.8.9

Return Value

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

Online 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