---
title: "Discussion on \"HyperLogLog\" | Hashnode"
description: "Discussion on \"HyperLogLog\". 基数计数基本概念\n基数计数(cardinality counting)通常用来统计一个集合中不重复的元素个数，例如统计某个网站的UV，或者用户搜索网站的关键词数量。数据分析、网络监控及数据库优化等领域都会涉及到基数计数的需求。 要实现基数计数，最简单的做法是记录集合中所有不重复的元素集合，当新来一个元素，若中不包含元素，则将加入，否则不加入，计数值就是的元素数量。这种做法存在两个问题：\n\n当统计的数据量变大时，相应的存储内存也会线性增长\n\n当集合变大，判断其是否包含新加入元素的成本变大\n\n\n\n概..."
url: "https://hashnode.com/posts/hyperloglog/62b172bfc0f84f6b540d2c09"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [HyperLogLog](https://techcats-blog.abser.top/hyperloglog?utm_source=hashnode&utm_medium=feed)

基数计数基本概念 基数计数(cardinality counting)通常用来统计一个集合中不重复的元素个数，例如统计某个网站的UV，或者用户搜索网站的关键词数量。数据分析、网络监控及数据库优化等领域都会涉及到基数计数的需求。 要实现基数计数，最简单的做法是记录集合中所有不重复的元素集合，当新来一个元素，若中不包含元素，则将加入，否则不加入，计数值就是的元素数量。这种做法存在两个问题： 当统计的数据量变大时，相应的存储内存也会线性增长 当集合变大，判断其是否包含新加入元素的成本变大 概...

Jun 21, 2022 · 2 min read · techcats-blog.abser.top  
Updated Jul 5, 2022  
Read the article

-   [#redis](https://hashnode.com/tag/redis)
-   [#mathematics](https://hashnode.com/tag/mathematics)
-   [#data-structures](https://hashnode.com/tag/data-structures)
-   [#algorithms](https://hashnode.com/tag/algorithms)
-   [#hyperloglog](https://hashnode.com/tag/hyperloglog)

## Written by

[Abser·Ari](https://hashnode.com/@abser)

@abser · Chengdu, China

  
[View profile](https://hashnode.com/@abser)

Build Better World

Let's Build Better World

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
