I am using cassandra 1.2 with CQL3. I have three column families in my key space. When I request one of the column families (phones), it takes a long time to retrieve. Here is my request
**select * from phones where phone_no in ('9038487582');**
Here is the trace result for the query.
activity | timestamp | source | source_elapsed -------------------------------------------------+--------------+-------------+---------------- execute_cql3_query | 16:35:47,675 | 10.1.26.155 | 0 Parsing statement | 16:35:47,675 | 10.1.26.155 | 58 Peparing statement | 16:35:47,675 | 10.1.26.155 | 335 Executing single-partition query on phones | 16:35:47,676 | 10.1.26.155 | 1069 Acquiring sstable references | 16:35:47,676 | 10.1.26.155 | 1097 Merging memtable contents | 16:35:47,676 | 10.1.26.155 | 1143 Partition index lookup complete for sstable 822 | 16:35:47,676 | 10.1.26.155 | 1376 Partition index lookup complete for sstable 533 | 16:35:47,686 | 10.1.26.155 | 10659 Merging data from memtables and 2 sstables | 16:35:47,704 | 10.1.26.155 | 29192 Read 1 live cells and 0 tombstoned | 16:35:47,704 | 10.1.26.155 | 29332 Request complete | 16:35:47,704 | 10.1.26.155 | 29601
I have only 1 replication factor in the key space. and have 3 node clusters. Phones have about 40 million lines and only two columns per line. it returns in 29 ms, 15 ms, 8 ms, 5 ms, 3 ms, but it is incompatible. Can you guys give me any suggestions as to what mistake I could make? Also my usecase will have an extremely low cache hit, so keys for caching for me are not a solution. Also, this is the definition of my column family.
CREATE TABLE phones ( phone_no text PRIMARY KEY, ypids set<int> ) WITH bloom_filter_fp_chance=0.100000 AND caching='KEYS_ONLY' AND comment='' AND dclocal_read_repair_chance=0.000000 AND gc_grace_seconds=864000 AND read_repair_chance=0.100000 AND replicate_on_write='true' AND populate_io_cache_on_flush='false' AND compaction={'class': 'LeveledCompactionStrategy'} AND compression={'sstable_compression': 'SnappyCompressor'};
source share