2011-11-25 82 views
0

我有1280行CF。 每行有6列。我試着去$ CF-> get_range( 'pq_questions', '', '',1200),並獲取所有行,但速度太慢(約4-6秒)phpcassa get_range太慢

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 當我在Debian調用htop我看到的最負載導致phpcassa 我只有一個節點,並使用一致性水平之一。 什麼能引起這麼慢quering?

回答

5

我猜你沒有C extension installed。沒有它,類似的查詢需要1-2秒。安裝它後,相同的查詢大約需要0.2秒。

關於NaN的讀等待時間,等待時間不捕獲get_range_slices(get_range在phpcassa)。

+0

泰勒,我可以請你對我的問題的迴應,我想只有你可以在這裏做 – Alice