Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C376217436 for ; Tue, 12 May 2015 12:24:45 +0000 (UTC) Received: (qmail 32657 invoked by uid 500); 12 May 2015 12:24:43 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 32616 invoked by uid 500); 12 May 2015 12:24:42 -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 32606 invoked by uid 99); 12 May 2015 12:24:42 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 May 2015 12:24:42 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 712F118294F for ; Tue, 12 May 2015 12:24:42 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.88 X-Spam-Level: ** X-Spam-Status: No, score=2.88 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id sSNczQB6S6zK for ; Tue, 12 May 2015 12:24:37 +0000 (UTC) Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 1015543E3C for ; Tue, 12 May 2015 12:24:37 +0000 (UTC) Received: by wgic8 with SMTP id c8so7575796wgi.1 for ; Tue, 12 May 2015 05:23:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=B6zZKOEkGhK1Jmmx50Q4PZrGdjavXMtKOYLgVp/cVTs=; b=gnOx/iP6RFP6kPufA1AmZRi541q+o+RNNSW77tZLtQAXfDpQ7Mazqznst4MkbLP4BI iRsNEXrFexGpgqEBv3A8EMPuSKMKcQUM1mwxAUoEbXdqoFfxq5yaEoQY4Si+J8EdsVV/ bCMYhiwUJ4mehNkVI7tZ6mQzGCmnSuvl8ZW1cqJKsObStYjRhDUANN6Yqth1AOBMjrko R+gSfw4+ESfM55ysIoOKqWPiF9Dc1YKeTNRfcz3Fhc+Mnu2qr0Qy5J0IckhtzTCHOBOK lEYLQAMrvj7GpRMpQjsKfb9K6hneagc0GV0R6KYhL3hcBmAyorPQoHHhIMOK4Fu+3efU cEoA== MIME-Version: 1.0 X-Received: by 10.180.101.105 with SMTP id ff9mr622662wib.64.1431433431232; Tue, 12 May 2015 05:23:51 -0700 (PDT) Received: by 10.27.18.9 with HTTP; Tue, 12 May 2015 05:23:51 -0700 (PDT) In-Reply-To: References: Date: Tue, 12 May 2015 08:23:51 -0400 Message-ID: Subject: Re: CQL Data Model question From: Jack Krupansky To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=f46d041825f83032e30515e19157 --f46d041825f83032e30515e19157 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Porting an SQL data model to Cassandra is an anti-pattern - don't do it! Instead, focus on developing a new data model that capitalizes on the key strengths of Cassandra - distributed, scalable, fast writes, fast direct access. Complex and ad-hoc queries are anti-patterns as well. I'll leave it to DataStax staff to decide whether they feel that DSE Search/Solr can help you on the complex and ad-hoc query front. Tell us more about what business problem your SQL data model was trying to accomplish. Get the business requirements sorted out before planning an implementation. You should also consider taking Cassandra data modeling training before diving in yourself with a data model. -- Jack Krupansky On Mon, May 11, 2015 at 2:32 PM, Alaa Zubaidi (PDF) wrote: > Hi, > > I am trying to port an Oracle Table to Cassandra. > the table is a wide table (931 columns) and could have millions of rows. > name, filter1, filter2....filter30, data1, data2...data900 > > The user would retrieve multiple rows from this table and filter (30 > filter columns) by one or more (up to 3) of the filter columns, it could = be > any of the filter columns. > (select * from table1 where name =3D .. and filter1 =3D .. and filter5=3D= .. ;) > > What is the best design for this in Cassandra/CQL? > > I tried the following: > Create table tab1 ( > name text, > flt1 text, > flt2 text, > flt3 text, > .. > flt30 text, > data text, > PRIMARY KEY (name, flt1, flt2, flt3, ..... flt30) ); > > Is there any side effects of having 30 composite keys? > > Thanks > > *This message may contain confidential and privileged information. If it > has been sent to you in error, please reply to advise the sender of the > error and then immediately permanently delete it and all attachments to i= t > from your systems. If you are not the intended recipient, do not read, > copy, disclose or otherwise use this message or any attachments to it. Th= e > sender disclaims any liability for such unauthorized use. PLEASE NOTE tha= t > all incoming e-mails sent to PDF e-mail accounts will be archived and may > be scanned by us and/or by external service providers to detect and preve= nt > threats to our systems, investigate illegal or inappropriate behavior, > and/or eliminate unsolicited promotional e-mails (=E2=80=9Cspam=E2=80=9D)= . If you have any > concerns about this process, please contact us at * > *legal.department@pdf.com* *.* --f46d041825f83032e30515e19157 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Porting an SQL data model to Cassandra is an anti-pattern = - don't do it! Instead, focus on developing a new data model that capit= alizes on the key strengths of Cassandra - distributed, scalable, fast writ= es, fast direct access. Complex and ad-hoc queries are anti-patterns as wel= l. I'll leave it to DataStax staff to decide whether they feel that DSE= Search/Solr can help you on the complex and ad-hoc query front.

Tell us more about what business problem your SQL data model was t= rying to accomplish. Get the business requirements sorted out before planni= ng an implementation.

You should also consider tak= ing Cassandra data modeling training before diving in yourself with a data = model.

-- Jack Krupansky

On Mon, May 11, 2015 at 2:32 PM, Alaa Zubaid= i (PDF) <alaa.zubaidi@pdf.com> wrote:
Hi,

I am trying to port = an Oracle Table to Cassandra.
the table is a wide table (931 colu= mns) and could have millions of rows.
=C2=A0name, filter1, filter= 2....filter30, data1, data2...data900 =C2=A0

The u= ser would retrieve multiple rows from this table and filter (30 filter colu= mns) by one or more (up to 3) of the filter columns, it could be any of the= filter columns.
(select * from table1 where name =3D .. and filt= er1 =3D .. and filter5=3D .. ;)

What is the best d= esign for this in Cassandra/CQL?

I tried the follo= wing:
Create table tab1 (
name text,
flt1 tex= t,
flt2 text,
flt3 text,
..
flt30 t= ext,
data text,
PRIMARY KEY (name, flt1, flt2, flt3, ..= ... flt30) );

Is there any side effects of having = 30 composite keys?

Thanks

This message may contain confidential and privileged information. If i= t has been sent to you in error, please reply to advise the sender of the e= rror and then immediately permanently delete it and all attachments to it f= rom your systems. If you are not the intended recipient, do not read, copy,= disclose or otherwise use this message or any attachments to it. The sende= r disclaims any liability for such unauthorized use. PLEASE NOTE that all = incoming e-mails sent to PDF e-mail accounts will be archived and may be sc= anned by us and/or by external service providers to detect and prevent thre= ats to our systems, investigate illegal or inappropriate behavior, and/or e= liminate unsolicited promotional e-mails (=E2=80=9Cspam=E2=80=9D). If you = have any concerns about this process, please contact us at legal.department@pdf.com.

--f46d041825f83032e30515e19157--