Redis中的Bitmap和HyperLogLog
Redis中Bitmap的妙用 Bitmap存储结构Bitmap上的统计bitcount count [start end]bitop operation destkey key [key ...]Bitmap的妙用用户在线状态用户签到统计活跃用户
Bitmap存储结构
在Redis中以位为单位存储字符串,这种存储结构称为Bitmap,也叫位图。
每个字节存储结构如下:
offset
0
1
2
3
4
5
6
7
value
0
0
0
0
0
0
0
0
setbit key 0 1
原创
2020-07-23 17:46:46 ·
792 阅读 ·
0 评论