cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Micha <mich...@fantasymail.de>
Subject secondary index use case
Date Thu, 20 Jul 2017 09:21:31 GMT
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