0

我有 1280 行的 CF。每行有 6 列。我试图 $cf->get_range('pq_questions','','',1200) 并且它获取所有行但太慢(大约 4-6 秒)

Column Family: pq_questions
                SSTable count: 1
                Space used (live): 668363
                Space used (total): 668363
                Number of Keys (estimate): 1280
                Memtable Columns Count: 0
                Memtable Data Size: 0
                Memtable Switch Count: 0
                Read Count: 0
                Read Latency: NaN ms.
                Write Count: 0
                Write Latency: NaN ms.
                Pending Tasks: 0
                Key cache capacity: 200000
                Key cache size: 1000
                Key cache hit rate: 0.10998439937597504
                Row cache capacity: 1000
                Row cache size: 1000
                Row cache hit rate: 0.0
                Compacted row minimum size: 373
                Compacted row maximum size: 1331
                Compacted row mean size: 574

这很奇怪,但是 cfstats 中的读取延迟是NaN ms 当我调用htopdebian 时,我看到负载最多的原因是phpcassa 我只有一个节点并使用一致性级别 ONE。是什么导致查询如此缓慢?

4

1 回答 1

5

我猜你没有安装 C 扩展。没有它,类似的查询对我来说需要 1-2 秒。安装后,相同的查询大约需要 0.2 秒。

关于 NaN 读取延迟,get_range_slices(phpcassa 中的 get_range)没有捕获延迟。

于 2011-11-25T20:07:29.253 回答