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 22D659ED7 for ; Mon, 23 Jul 2012 16:38:10 +0000 (UTC) Received: (qmail 59258 invoked by uid 500); 23 Jul 2012 16:38:07 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 59236 invoked by uid 500); 23 Jul 2012 16:38: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 59228 invoked by uid 99); 23 Jul 2012 16:38:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Jul 2012 16:38:07 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FSL_RCVD_USER,HTML_MESSAGE,PLING_QUERY,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of eldad87@gmail.com designates 209.85.213.172 as permitted sender) Received: from [209.85.213.172] (HELO mail-yx0-f172.google.com) (209.85.213.172) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Jul 2012 16:38:00 +0000 Received: by yenq13 with SMTP id q13so6205068yen.31 for ; Mon, 23 Jul 2012 09:37:39 -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=irg9H91ZiAQRCK7GV6NE84rzzKSCLPJYQQKyamw76VA=; b=Mw2qAaQiuFsOj8x9RACXq24utLAWiGAUUD0gFj9aAkN7a4vzYa6XBI4azw4KxXmP7J 55fK8qzqTRLNcu/PD2E5l4cUk2ZmmmVmMjgvUKfy66gt9Hu2qYEVbPnt1HXYYaWBMazw QgU2lcKDlunQY0dtc7YyE7eUeVj1pcyWCoU3zGpcKYixECHwU6nH7EzpoIiIEey3vepn vRLbB5YPuZQuaIOE3kve31cmcUf/zSvQwxaP/uhkzlrTYLMeVMK72z5lpeR6D1MItlw3 sa8eIatCpZ+uhhu1YhIIS1Cl9iosrEEe3aayeaWBEjF/MEM+4ESFjsfdnoMOEuALiXGa pG4w== MIME-Version: 1.0 Received: by 10.43.63.140 with SMTP id xe12mr8778902icb.57.1343061458637; Mon, 23 Jul 2012 09:37:38 -0700 (PDT) Received: by 10.64.60.167 with HTTP; Mon, 23 Jul 2012 09:37:38 -0700 (PDT) In-Reply-To: References: Date: Mon, 23 Jul 2012 19:37:38 +0300 Message-ID: Subject: Re: Schema advice: (Single row or multiple row!?) How do I store millions of columns when I need to read a set of around 500 columns at a single read query using column names ? From: Eldad Yamin To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=bcaec51b1e3b27529304c581ddd1 --bcaec51b1e3b27529304c581ddd1 Content-Type: text/plain; charset=ISO-8859-1 in addition, if you don't know how many rows will be needed - in each row, you can store the key of the next one. Just like in a linked list. OR have 1 row that will hold all the keys that combining your other rows. 1st select the main row (with the keys), then select the other rows. On Mon, Jul 23, 2012 at 3:40 PM, rohit bhatia wrote: > You should probably try to break the one row scheme to > 2*Number_of_nodes rows scheme.. This should ensure proper distribution > of rows and still allow u to query from a few fixed number of rows. > How u do it depends on how are u gonna choose ur 200-500 columns > during reading (try having them in the same row) > > Even if u r forced to put them in seperate rows, u can make the row > key as "some modulus of hash of column name", ensuring symmetry and > easy access of columns... > > On Mon, Jul 23, 2012 at 6:02 PM, Ertio Lew wrote: > > Any ideas/suggestions please? > --bcaec51b1e3b27529304c581ddd1 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
in addition, if you don't know how many rows will be n= eeded -=A0in each row, you can store the key of the next one.
Just= like in a linked list.

OR

have 1 row that will hold all the keys that combining your other rows.
1st select the main row (with the keys), then select the other rows.<= /div>



On Mon, Jul 23, = 2012 at 3:40 PM, rohit bhatia <rohit2412@gmail.com> wrote:=
You should probably try to break the one row= scheme to
2*Number_of_nodes rows scheme.. This should ensure proper distribution
of rows and still allow u to query from a few fixed number of rows.
How u do it depends on how are u gonna choose ur 200-500 columns
during reading (try having them in the same row)

Even if u r forced to put them in seperate rows, u can make the row
key as "some modulus of hash of column name", ensuring symmetry a= nd
easy access of columns...

On Mon, Jul 23, 2012 at 6:02 PM, Ertio Lew <ertiop93@gmail.com> wrote:
> Any ideas/suggestions please?

--bcaec51b1e3b27529304c581ddd1--