天天看點

Redis學習筆記 - 14.Redis 進階功能-HyperLogLog

定義

  • 隻為了計算獨立總數,不需要擷取單條資料。
  • 可以容忍一定誤差率,畢竟HyperLogLog在記憶體的占用量上有很大的優勢。

指令

添加

pfadd key element [element ...]
           

計算獨立總數

pfcount key [key ...]
           

合并

pfmerge destkey sourcekey [sourcekey ...]
           

繼續閱讀