Latest web development tutorials

คำสั่ง Redis Pfcount

Redis HyperLogLog

Redis Pfcount คำสั่งส่งคืนประมาณการที่กำหนดฐาน HyperLogLog

ไวยากรณ์

Redis Pfcount ไวยากรณ์คำสั่งพื้นฐานจะเป็นดังนี้:

redis 127.0.0.1:6379> PFCOUNT key [key ...]

รุ่นที่มีจำหน่าย

> = 2.8.9

ราคาย้อนกลับ

จำนวนเต็มส่งคืนค่าฐาน HyperLogLog และถ้ามากกว่าหนึ่ง HyperLogLog การประเมินฐานและผลตอบแทน

ตัวอย่าง

redis 127.0.0.1:6379> PFADD hll foo bar zap
(integer) 1
redis 127.0.0.1:6379> PFADD hll zap zap zap
(integer) 0
redis 127.0.0.1:6379> PFADD hll foo bar
(integer) 0
redis 127.0.0.1:6379> PFCOUNT hll
(integer) 3
redis 127.0.0.1:6379> PFADD some-other-hll 1 2 3
(integer) 1
redis 127.0.0.1:6379> PFCOUNT hll some-other-hll
(integer) 6
redis> 

Redis HyperLogLog