incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edward Capriolo <edlinuxg...@gmail.com>
Subject Re: Query data in a CF within a timestamp range
Date Thu, 28 Feb 2013 23:04:59 GMT
Pseudo code :

GregorianCalendar gc = new GregorianCalendar();
DateFormat df = new SimpleDateFormat( "yyyyMMddhhmm');
String reversekey = df.format(gc);

set mycolumnfamily['myrow']['mycolumn'] = 'myvalue';
set myreverseindex['$reversekey]['myrow'] = '';

Under rapid insertion this makes hot-spots. Not an easy way around
that other then sharding the reverse index.


On Thu, Feb 28, 2013 at 5:49 PM, Kasun Weranga <kasunw@wso2.com> wrote:
> Hi all,
>
> I have a column family with some data + timestamp values and I want to query
> the column family to fetch data within a timestamp range. AFAIK it is not
> better to use secondary index for timestamp due to high cardinality.
>
> Is there a way to achieve this functionality?
>
> Thanks,
> Kasun.

Mime
View raw message