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 DB6E2DCE4 for ; Mon, 23 Jul 2012 18:11:15 +0000 (UTC) Received: (qmail 40490 invoked by uid 500); 23 Jul 2012 18:11:13 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 40462 invoked by uid 500); 23 Jul 2012 18:11:13 -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 40454 invoked by uid 99); 23 Jul 2012 18:11:13 -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 18:11:13 +0000 X-ASF-Spam-Status: No, hits=1.8 required=5.0 tests=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 mohitanchlia@gmail.com designates 209.85.213.44 as permitted sender) Received: from [209.85.213.44] (HELO mail-yw0-f44.google.com) (209.85.213.44) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Jul 2012 18:11:05 +0000 Received: by yhq56 with SMTP id 56so6319801yhq.31 for ; Mon, 23 Jul 2012 11:10:44 -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=J/4n6K197D6VB8Xl9Sih8ooWZ8M8nMaeuuNW8vLYsaA=; b=Ylyv7ryy3vJTxLuHvgTP7WPwtS/wSAVD5RM6At66KuAa2Ty+9S/qD20epB5rxFiUhN PEDbMuRbJGhbLY776RTUpaWaPMTS15SKKZkiChSDW4NBVk5mZLKacTutsJl2T/xFkMlE cnoIxGChrcuHWCjgLBQrx4h6SYWS5J5WBneW+79LnYe7kPZIIkuCMwIEiQed3Q2j3Km7 A143jXuj5eVjgazB377xzkIh/t0xVP37ptR9PQ5A4TbRYgOPM65H40+iic2XY1NYBi0T sK06+fI5NM0rc83pC9X/FqC0fGHFkIl6LnG31FuugnFKw9StFpLJwQMKMQeK46Btfxbs Qu3w== MIME-Version: 1.0 Received: by 10.50.157.136 with SMTP id wm8mr11331158igb.14.1343067044117; Mon, 23 Jul 2012 11:10:44 -0700 (PDT) Received: by 10.64.65.1 with HTTP; Mon, 23 Jul 2012 11:10:44 -0700 (PDT) In-Reply-To: References: Date: Mon, 23 Jul 2012 11:10:44 -0700 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: Mohit Anchlia To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=e89a8f234cc312fd5404c5832ab2 --e89a8f234cc312fd5404c5832ab2 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Jul 23, 2012 at 11:00 AM, Ertio Lew wrote: > For each user in my application, I want to store a *value* that is queried > by using the userId. So there is going to be one column for each user > (userId as col Name & *value* as col Value). Now I want to store these > columns such that can efficiently read columns for atleast 300-500 users > in a single read query. Is the query timebased or userid based? How do you determine which users to read first? Do you read all of them or few of them? What's the query criteria? It would be helpful to understand exactly how your query works. In NoSQL there are no Btree indexes, which means you need to store data that is materialized based on your query pattern. --e89a8f234cc312fd5404c5832ab2 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Mon, Jul 23, 2012 at 11:00 AM, Ertio Lew <e= rtiop93@gmail.com> wrote:
For each user in my application, I wa= nt to store a *value* that is queried by using the userId. So there is goin= g to be one column for each user (userId as col Name & *value* as col V= alue). Now I want to store these columns such that can efficiently read col= umns for=A0 atleast=A0=A0300-500 users in a single read query.
=A0
Is the query timebased or userid based? How do you determine which use= rs to read first? Do you read all of them or few of them? What's the qu= ery criteria?
=A0
It would be helpful to understand exactly how your query works. In NoS= QL there are no Btree indexes, which means you need to store data that is m= aterialized based on your query pattern.

=A0
--e89a8f234cc312fd5404c5832ab2--