4

I'm new to Cassandra and I'm trying to optimize my reads (write time is fine, about 1000 rows per .1 seconds) and I'm been reading up on the Key cache and Row cache.

Using Java w/ the Hector library to insert the data everything seems to go fine but the reads are really slow (about 2-3x slower than a SQL Server instance I'm comparing against). I started looking at the stats ad cfstats shows:

Key cache capacity: 200000
Key cache size: 0
Key cache hit rate: NaN
Row cache capacity: 40000
Row cache size: 0

Shouldn't there be something in the Key or Row cache after the insert? I think that is why it is running so slowly when I try to read.

Any help would be appreciated...

4

1 回答 1

3

密钥缓存仅用于从磁盘 sstables 读取的数据。如果您查询的数据最近已插入或更新,则会从 memtable 中读取,并且不会填充密钥缓存。

于 2011-12-24T23:32:47.810 回答