paint-brush
How to use Redis HyperLogLogby@vgukasov
1,686 reads
1,686 reads

How to use Redis HyperLogLog

by Vladislav Gukasov3mJanuary 24th, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Redis has the HyperLogLog data structure to store many unique events, and it takes up a constant amount of memory. HyperLogLog is a probabilistic structure which means with a large data set, the count of the number of elements can have an error of up to 0.81%. Redis would consume a huge amount of time to process millions of items and Redis Sets can be used only in small or medium projects. Use Redis HyperLogLog instead. To write data to Redis, use the `pfadd key [element [element...].` command. To read, use pfcount key [key ...] command. Use The pfmerge command to merge several HyperLogLog keys into a single one.
featured image - How to use Redis HyperLogLog
Vladislav Gukasov HackerNoon profile picture
Vladislav Gukasov

Vladislav Gukasov

@vgukasov

Software Engineer @ Amazon

About @vgukasov
LEARN MORE ABOUT @VGUKASOV'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Vladislav Gukasov HackerNoon profile picture
Vladislav Gukasov@vgukasov
Software Engineer @ Amazon

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite