cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Prem Yadav <ipremya...@gmail.com>
Subject UUID question
Date Mon, 23 Nov 2015 16:08:51 GMT
Hi,

I am trying to understand different use cases related to using UUID as the
partition key. I am sure I am missing something trivial and will be
grateful and you can help me understand this.

When do you use the UUID as the primary key? What can be a use case?
Since it is unique, how do you query it?

Let's take a user table with UUID as primary key.

create table user (id uuid primary key, name varchar,company
varchar,country varchar);

Now I can write to the table using the uuid() function to generate the uid.
But how do you query it?
The only use case I see is create a secondary index and use that for
querying.

Am I missing something here?

Thanks,
Prem

Mime
View raw message