Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0325F200B96 for ; Thu, 6 Oct 2016 18:31:10 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 01991160ADB; Thu, 6 Oct 2016 16:31:10 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1F798160AC5 for ; Thu, 6 Oct 2016 18:31:08 +0200 (CEST) Received: (qmail 3234 invoked by uid 500); 6 Oct 2016 16:31:07 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 3224 invoked by uid 99); 6 Oct 2016 16:31:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Oct 2016 16:31:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id D589DC0C0A for ; Thu, 6 Oct 2016 16:31:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.379 X-Spam-Level: ** X-Spam-Status: No, score=2.379 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id lC_c0BuO6Ubn for ; Thu, 6 Oct 2016 16:31:05 +0000 (UTC) Received: from mail-yw0-f175.google.com (mail-yw0-f175.google.com [209.85.161.175]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id EBFE85F231 for ; Thu, 6 Oct 2016 16:31:04 +0000 (UTC) Received: by mail-yw0-f175.google.com with SMTP id u124so16257516ywg.3 for ; Thu, 06 Oct 2016 09:31:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=IcpwLhKmbgMn2kcQ7GhlvECCVsPnTflMREPCAV9Qa74=; b=KVedVIsaOVxIaPRgtHpUU/BuhgtYHvOg+JgoAzm+jhqt9CgjnLrI5IJDTvOqHIOYN5 nmdxF6xUFtcTOkxxBghITgf2luaKdeAuJ2LzBF1Z9P1g5ym2gKmWR0THjSza2xDQN0jq 412UKW8eeXMc3DFBeG6NJjxQJX4vn0R9LNZQhTC4J7E6E5GFkdvQRHJY02pKNlfjDVXu W9gIHzpwGBy0OybzCkGcylhRvLiOuYikUwV90frCZpniu4jMcXpgAgQzhUAljjMKhVIX mlcSExDl7qqMx9yuf5A8S+G3UZ5uAXb6UU+ioZdnaDmRaUdgaHo+PA/f7x8Z5DkJAPrT 8GXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=IcpwLhKmbgMn2kcQ7GhlvECCVsPnTflMREPCAV9Qa74=; b=UWVm7IBkq5vBjOHHIVSkFo/8ajNTTTmdl7p0Gz11iFVDeAtA7/MYtOx3trmo2WA1pZ oMLq2fBfoL1cTFmEMA+Ko5T+DIFOf2vFXRxl8wCGWFDB2lEeG5v4DJHmum16NUoBlEgE 0/pPzrSijoURAC2FaiOcx7P4sfhn8Wi1GPZjYgtPZaqVVJ0f6AN0LGmUV9GDQ9ik23lh lJlqjlMF0nC+4IalKg1AQ3K91WQIe0kMELi3X6rfd0rCwWboNz3DhAweso1D1srF9QGl Ri+2XRMYdD2Vzqx1Y+Yk+3llXs7/rka4kJZng3oO2xrlpF299J0v2HYJf1cFOvtjrXWf 7WTw== X-Gm-Message-State: AA6/9RmcuS4to4zIfvLCnW9X2QTvdbjRDlRgboM++eH7UNNDS9kiXBJMqP8Ow8NihBmKoIHzZ8shoyenAM0sMg== X-Received: by 10.13.246.199 with SMTP id g190mr11327273ywf.124.1475771458123; Thu, 06 Oct 2016 09:30:58 -0700 (PDT) MIME-Version: 1.0 From: Philip Persad Date: Thu, 6 Oct 2016 09:30:57 -0700 Message-ID: <-8573435116428556423@unknownmsgid> Subject: RE: Partition Key - Wide rows? To: Ali Akhtar , "user@cassandra.apache.org" Content-Type: multipart/alternative; boundary=94eb2c03116c87ffb4053e34d15f archived-at: Thu, 06 Oct 2016 16:31:10 -0000 --94eb2c03116c87ffb4053e34d15f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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). Cheers, -Phil ------------------------------ From: Ali Akhtar Sent: =E2=80=8E2016-=E2=80=8E10-=E2=80=8E06 9:04 AM To: user@cassandra.apache.org Subject: Partition Key - Wide rows? Heya, I'm designing some tables, where data needs to be stored in the following hierarchy: 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 project. 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? --94eb2c03116c87ffb4053e34d15f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


1) No.= =C2=A0 Your first 3 queries will work but not the last one (get issue by id= ).=C2=A0 In Cassandra when you query you must include every preceding porti= on of the primary key.

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

3) Depends on how you build your partition key.=C2= =A0 If partition key is (org id), then you get one partition per org (proba= bly bad depending on your dataset).=C2=A0 If partition key is (org id, team= id, project id) then you will have one partition per project which is prob= ably fine ( again, depending on your dataset).

Cheers,

-Phil<= /div>

From: Ali Akhtar
Se= nt: = =E2=80=8E2016-=E2=80=8E10-=E2=80=8E06 9:04 AM
To: user@cassandra.apache.org
Sub= ject: = Partition Key - Wide rows?

Heya,

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

Organiza= tion -> 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 w= ill be an alphanumeric string, unique per project.

1) Will this setup allow using all 4 query scenarios?
2) Will th= is make the primary key really long, 3 UUIDs + similar length'd issue i= d?
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 i= ssues, 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?
<= div>



--94eb2c03116c87ffb4053e34d15f--