cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vladimir Yudovin <vla...@winguzone.com>
Subject Re: secondary index use case
Date Thu, 20 Jul 2017 13:31:35 GMT
Hi,



You didn't mention your C* version, but starting from 3.4 SASI indexes are available. You
can try it with SPARSE option, as uuid corresponds to only one row.



Best regards, Vladimir Yudovin, 

Winguzone - Cloud Cassandra Hosting






---- On Thu, 20 Jul 2017 05:21:31 -0400 Micha &lt;micha-1@fantasymail.de&gt; wrote
----




Hi, 

 

even after reading much about secondary index usage I'm not sure if I 

have the correct use case for it. 

 

My table will contain about 150'000'000 records (each about 2KB data). 

There are two uuids used to identify a row. One uuid is unique for each 

row, the other uuid is something like a groupid, which give mostly 20 

records when queried. 

 

So, if I define my primary key as (groupuuid, uuid) then: 

"select * ... where groupuuid = X" gives me 0 - 20 rows 

 

"select * ... where groupuuid = X and uuid = Y" gives me 0 | 1 row 

 

now, sometimes I want to query only with uuid: 

"select * ... where uuid = X" to get exactly one row (without using 

groupid) 

 

Is this a good use case for a secondary index on uuid? 

 

 

Thanks for helping, 

 Michael 

 

 

 

 

 

 

--------------------------------------------------------------------- 

To unsubscribe, e-mail: user-unsubscribe@cassandra.apache.org 

For additional commands, e-mail: user-help@cassandra.apache.org 

 







Mime
View raw message