Re: Multi-column range scans

2014-07-14 Thread Matthew Allen
Thanks for both your help, greatly appreciated. We'll proceed down the path of putting the filtering into the application logic for the time being. Matt. On Tue, Jul 15, 2014 at 1:20 AM, DuyHai Doan wrote: > Exact Ken, I get bitten again by the semantics of composite tuples. > > This kind of

Re: Multi-column range scans

2014-07-14 Thread DuyHai Doan
Exact Ken, I get bitten again by the semantics of composite tuples. This kind of query won't be possible until something like wide row end slice predicate is available ( https://issues.apache.org/jira/browse/CASSANDRA-6167), if it will one day On Mon, Jul 14, 2014 at 5:02 PM, Ken Hancock wro

Re: Multi-column range scans

2014-07-14 Thread Ken Hancock
I don't think your query is doing what he wants. Your query will correctly set the starting point, but will also return larger interval_id's but with lower skill_levels: cqlsh:test> select * from skill_count where skill='Complaints' and (interval_id, skill_level) >= (140235930, 5); skill

Re: Multi-column range scans

2014-07-14 Thread DuyHai Doan
or : select * from skill_count where skill='Complaints' and (interval_id,skill_level) >= (140235930,5) and (interval_id) < (140235990) Strange enough, when starting using tuple notation you'll need to stick to it even if there is only one element in the tuple On Mon, Jul 14, 2014 at 1:4

Re: Multi-column range scans

2014-07-14 Thread DuyHai Doan
Sorry, I've just checked, the correct query should be: select * from skill_count where skill='Complaints' and (interval_id,skill_level) >= (140235930,5) and (interval_id,skill_level) < (140235990,11) On Mon, Jul 14, 2014 at 9:45 AM, DuyHai Doan wrote: > Hello Mathew > > Since Cassandr

Re: Multi-column range scans

2014-07-14 Thread DuyHai Doan
Hello Mathew Since Cassandra 2.0.6 it is possible to query over composites: https://issues.apache.org/jira/browse/CASSANDRA-4851 For your example: select * from skill_count where skill='Complaints' and (interval_id,skill_level) >= (140235930,5) and interval_id < 140235990; On Mon, Jul

Multi-column range scans

2014-07-13 Thread Matthew Allen
Hi, We have a roll-up table that as follows. CREATE TABLE SKILL_COUNT ( skill text, interval_id bigint, skill_level int, skill_count int, PRIMARY KEY (skill, interval_id, skill_level)); Essentially, skill = a names skill i.e. "Complaints" interval_id = a rounded epoch time (15 minu