Return-Path: X-Original-To: apmail-cassandra-dev-archive@www.apache.org Delivered-To: apmail-cassandra-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CC0751075F for ; Tue, 9 Jul 2013 17:47:05 +0000 (UTC) Received: (qmail 3903 invoked by uid 500); 9 Jul 2013 17:47:04 -0000 Delivered-To: apmail-cassandra-dev-archive@cassandra.apache.org Received: (qmail 3848 invoked by uid 500); 9 Jul 2013 17:47:01 -0000 Mailing-List: contact dev-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list dev@cassandra.apache.org Received: (qmail 3840 invoked by uid 99); 9 Jul 2013 17:47:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jul 2013 17:47:01 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dlee@amplience.com designates 213.199.154.11 as permitted sender) Received: from [213.199.154.11] (HELO emea01-am1-obe.outbound.protection.outlook.com) (213.199.154.11) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jul 2013 17:46:55 +0000 Received: from DBXPR07MB111.eurprd07.prod.outlook.com (10.242.138.149) by DBXPR07MB111.eurprd07.prod.outlook.com (10.242.138.149) with Microsoft SMTP Server (TLS) id 15.0.702.21; Tue, 9 Jul 2013 17:46:32 +0000 Received: from DBXPR07MB111.eurprd07.prod.outlook.com ([169.254.10.89]) by DBXPR07MB111.eurprd07.prod.outlook.com ([169.254.10.89]) with mapi id 15.00.0702.005; Tue, 9 Jul 2013 17:46:32 +0000 From: Darren Lee To: "'dev@cassandra.apache.org'" Subject: Composite Key Overload Thread-Topic: Composite Key Overload Thread-Index: Ac58yndBxMfKWFa/RWS3vsGOy3bjdg== Date: Tue, 9 Jul 2013 17:46:31 +0000 Message-ID: <5904defb3cbf4e00b18c3f2ca70048df@DBXPR07MB111.eurprd07.prod.outlook.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [109.204.98.90] x-forefront-prvs: 0902222726 x-forefront-antispam-report: SFV:NSPM;SFS:(53754006)(199002)(189002)(56816003)(50986001)(49866001)(54316002)(79102001)(63696002)(31966008)(33646001)(47976001)(80022001)(74706001)(16406001)(76796001)(77096001)(74876001)(83072001)(16236675002)(77982001)(15202345003)(54356001)(74502001)(4396001)(53806001)(56776001)(65816001)(46102001)(66066001)(19300405004)(74366001)(76176001)(74316001)(59766001)(47736001)(81542001)(69226001)(51856001)(74662001)(47446002)(76576001)(76482001)(76786001)(81342001)(24736002)(491001);DIR:OUT;SFP:;SCL:1;SRVR:DBXPR07MB111;H:DBXPR07MB111.eurprd07.prod.outlook.com;RD:InfoNoRecords;A:1;MX:1;LANG:en; Content-Type: multipart/alternative; boundary="_000_5904defb3cbf4e00b18c3f2ca70048dfDBXPR07MB111eurprd07pro_" MIME-Version: 1.0 X-OriginatorOrg: amplience.com X-Virus-Checked: Checked by ClamAV on apache.org --_000_5904defb3cbf4e00b18c3f2ca70048dfDBXPR07MB111eurprd07pro_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Everyone, I have a CF which currently has a large composite key. Let's say it has 5 c= omponents, A,B,C,D,E. I know I need to be able to query and find all rows where A,B,C equal a cer= tain value. And I also need to query when A,B,C,D are a certain value. Traditionally what is the best approach for this? * Composite key? Is it possible to query on components of the compo= site key? * Duplicate the fields I want to query on and create a secondary in= dex * Expand the data into supercolumns for horizontal traversal * Create lookup tables and suffer having to do reads before being a= ble to write updates Thanks --_000_5904defb3cbf4e00b18c3f2ca70048dfDBXPR07MB111eurprd07pro_--