gpt4 book ai didi

cassandra - 如何计算出 Cassandra 表中键的大概数量?

转载 作者:行者123 更新时间:2023-12-02 00:50:35 25 4
gpt4 key购买 nike

我在运行 nodetool cfstats 时看到了对 'Number of key(estimate) 的引用,但至少在我的系统中(Cassandra 版本 3.11.3),我没看到:

           Table: XXXXXX
SSTable count: 4
Space used (live): 2393755943
Space used (total): 2393755943
Space used by snapshots (total): 0
Off heap memory used (total): 2529880
SSTable Compression Ratio: 0.11501749368144083
Number of partitions (estimate): 1146
Memtable cell count: 296777
Memtable data size: 147223380
Memtable off heap memory used: 0
Memtable switch count: 127
Local read count: 9
Local read latency: NaN ms
Local write count: 44951572
Local write latency: 0.043 ms
Pending flushes: 0
Percent repaired: 0.0
Bloom filter false positives: 0
Bloom filter false ratio: 0.00000
Bloom filter space used: 2144
Bloom filter off heap memory used: 2112
Index summary off heap memory used: 240
Compression metadata off heap memory used: 2527528
Compacted partition minimum bytes: 447
Compacted partition maximum bytes: 43388628
Compacted partition mean bytes: 13547448
Average live cells per slice (last five minutes): NaN
Maximum live cells per slice (last five minutes): 0
Average tombstones per slice (last five minutes): NaN
Maximum tombstones per slice (last five minutes): 0
Dropped Mutations: 0

有没有办法用这个版本的 Cassandra 来近似 select count(*) from XXXXXX

最佳答案

“键数”与“分区数”相同——同样是一个估计值。如果您的分区键是主键(无聚簇列),那么您将估计该节点上的行数。否则,它只是分区键值数量的估计。

-吉姆

关于cassandra - 如何计算出 Cassandra 表中键的大概数量?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57962082/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com