incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sávio Teles <savio.te...@lupa.inf.ufg.br>
Subject Re: How to perform range queries efficiently?
Date Tue, 27 Aug 2013 12:00:33 GMT
We have 700.000 rows.
I've indexed "salary","age" and "gender" attrs.
Take about 20 minutes.


2013/8/27 Alain RODRIGUEZ <arodrime@gmail.com>

> Can you send us the result of a "describe columnfamily users" ?
>
> How many rows are presents in this table ?
>
> Do you have indexes defined ?
>
> What is a "long time" exactly ?
>
> Alain
> Le 23 août 2013 14:53, "Sávio Teles" <savio.teles@lupa.inf.ufg.br> a
> écrit :
>
> I need to perform range query efficiently. I have the table like:
>>
>> users
>> -------
>> user_id | age | gender | salary | ...
>>
>> The attr user_id is the PRIMARY KEY.
>>
>> Example of querying:
>>
>> select * from users where user_id = '*x*' and age > *y *and age < *z*and salary
>
>> *a* and salary < *b  *and age='M';
>>
>> This query takes a long time to run. Any ideas to perform it efficiently?
>>
>> Tks in advance.
>>
>>
>> --
>> Atenciosamente,
>> Sávio S. Teles de Oliveira
>> voice: +55 62 9136 6996
>> http://br.linkedin.com/in/savioteles
>>  Mestrando em Ciências da Computação - UFG
>> Arquiteto de Software
>> Laboratory for Ubiquitous and Pervasive Applications (LUPA) - UFG
>>
>


-- 
Atenciosamente,
Sávio S. Teles de Oliveira
voice: +55 62 9136 6996
http://br.linkedin.com/in/savioteles
Mestrando em Ciências da Computação - UFG
Arquiteto de Software
Laboratory for Ubiquitous and Pervasive Applications (LUPA) - UFG

Mime
View raw message