You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Donal Zang <za...@ihep.ac.cn> on 2011/04/04 17:45:33 UTC

statistcs query on cassandra

Can we do count like this?
/count <cf>[<startKey>:<endKey>] where <column> = <value>/

-- 
Donal Zang
Computing Center, IHEP
19B YuquanLu, Shijingshan District,Beijing, 100049
zangds@ihep.ac.cn
86 010 8823 6018


Re: statistcs query on cassandra

Posted by aaron morton <aa...@thelastpickle.com>.
No. 

You could  build a custom secondary index where "column=value" is the key and startKey and endKey are column names. Then call get_count() with a SlicePredicate that specifies the startKey and endKey as the start and finish column names. 

Aaron

On 5 Apr 2011, at 01:45, Donal Zang wrote:

> Can we do count like this?
> count <cf>[<startKey>:<endKey>] where <column> = <value>
> -- 
> Donal Zang
> Computing Center, IHEP 
> 19B YuquanLu, Shijingshan District,Beijing, 100049
> zangds@ihep.ac.cn
> 86 010 8823 6018