Redis › HyperLogLog in Redis
What are the limitations of HyperLogLog that make it unsuitable for certain use cases, even though it is excellent for approximate unique counting?
AdvancedAnswer
HyperLogLog can only give you the approximate count of unique items and cannot tell you what those specific items actually are, cannot remove a previously added item from the count, and its small error margin makes it unsuitable for situations requiring an exact count, such as billing calculations based on precise usage numbers.
-- HyperLogLog cannot list the actual unique items,
-- only estimate how many there are
PFCOUNT unique_visitors -- returns a count, not the actual visitor listReal-world example A billing system that needs to charge customers based on an exact count of unique API calls avoids using HyperLogLog for this specific calculation, instead using an exact counting method since even a small error could result in an incorrect charge.