cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philip Persad <>
Subject RE: Partition Key - Wide rows?
Date Thu, 06 Oct 2016 16:30:57 GMT
1) No.  Your first 3 queries will work but not the last one (get issue by
id).  In Cassandra when you query you must include every preceding portion
of the primary key.

2) 64 bytes (16 * 4), or somewhat more if storing as strings?  I don't
think that's something I'd worry too much about.

3) Depends on how you build your partition key.  If partition key is (org
id), then you get one partition per org (probably bad depending on your
dataset).  If partition key is (org id, team id, project id) then you will
have one partition per project which is probably fine ( again, depending on
your dataset).


From: Ali Akhtar <>
Sent: ‎2016-‎10-‎06 9:04 AM
Subject: Partition Key - Wide rows?


I'm designing some tables, where data needs to be stored in the following

Organization -> Team -> Project -> Issues

I need to be able to retrieve issues:

- For the whole org - using org id
- For a team (org id + team id)
- For a project (org id + team id + project id)
- If possible, by using just the issue id

I'm considering using all 4 ids as the primary key. The first 3 will use
UUIDs, except issue id which will be an alphanumeric string, unique per

1) Will this setup allow using all 4 query scenarios?
2) Will this make the primary key really long, 3 UUIDs + similar length'd
issue id?
3) Will this store issues as skinny rows, or wide rows? If an org has a lot
of teams, which have a lot of projects, which have a lot of issues, etc,
could I have issues w/ running out of the column limit of wide rows?
4) Is there a better way of achieving this scenario?

View raw message