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 261BE768B for ; Thu, 29 Dec 2011 09:16:04 +0000 (UTC) Received: (qmail 79404 invoked by uid 500); 29 Dec 2011 09:16:01 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 79355 invoked by uid 500); 29 Dec 2011 09:16:00 -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 79347 invoked by uid 99); 29 Dec 2011 09:16:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Dec 2011 09:16:00 +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 (nike.apache.org: domain of watcherfr@gmail.com designates 74.125.82.172 as permitted sender) Received: from [74.125.82.172] (HELO mail-we0-f172.google.com) (74.125.82.172) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Dec 2011 09:15:52 +0000 Received: by werb14 with SMTP id b14so7162367wer.31 for ; Thu, 29 Dec 2011 01:15:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=FDFp1WRP3kObkcvU0c/Z5rEw92IGuCfFGTUC/UXMYbE=; b=HMxM2eg9uCkE1H9rEx/s9pwhqFmBTN7ye1RpQzpXSlNH5e+QAR5LOJn3qv2w6/lZ96 CT3i5PIlN5RwtxP6/p3/mYoZTcfUu4lZGRrG1jXF6tSSwWtdnB2VOmae3SYhKGq1NSkj xZioAe9P1sw1L3CUN33DT4p124OYeMjoosXu4= MIME-Version: 1.0 Received: by 10.216.139.153 with SMTP id c25mr25125700wej.25.1325150131749; Thu, 29 Dec 2011 01:15:31 -0800 (PST) Received: by 10.180.107.228 with HTTP; Thu, 29 Dec 2011 01:15:31 -0800 (PST) Received: by 10.180.107.228 with HTTP; Thu, 29 Dec 2011 01:15:31 -0800 (PST) In-Reply-To: References: Date: Thu, 29 Dec 2011 10:15:31 +0100 Message-ID: Subject: Re: Retrieve all composite columns from a row, whose composite name's first component matches from a list of Integers From: Philippe To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=0016e6de03d3e084de04b5378e4d X-Virus-Checked: Checked by ClamAV on apache.org --0016e6de03d3e084de04b5378e4d Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Would you stand by that statement in case all colums inside the super column need to be read? Why? Thanks Le 28 d=E9c. 2011 19:26, "Edward Capriolo" a =E9cri= t : > Super columns have the same fundamental problem and perform worse in > general. So switching from composites to super columns is NEVER a good id= ea. > > > On Wed, Dec 28, 2011 at 1:19 PM, Aditya wrote: > >> Since I have around 20 items to query, I guess making 20 queries to >> retrieve activities by all followies on all of those 20 columns would to= o >> inefficient, so to take the advantage of more efficient queries, are >> supercolumns recommended for this case ? Anyways, in case I use >> supercolumns, I need to retrieve the entire supercolumn at any point of >> time & I am writing subcolumn(s) to the supercolumn at different times n= ot >> at once. >> >> On Wed, Dec 28, 2011 at 8:07 PM, Edward Capriolo = wrote: >> >>> You need to execute one get slice operation for each item id or if the >>> row is not large , you can try one large get slice on the entire row an= d >>> deal with the results client side. >>> >>> If you try method 1 When doing slices on composites you can set the >>> start inclusive or exclusive values to get only the column you want and= not >>> some extra columns up to slice range size. >>> >>> >>> On Tuesday, December 27, 2011, Aditya wrote: >>> > I need to store data of all activities by user's followies in single >>> row. I am trying to do that making use of composite column names in a >>> single user specific row named 'rowX'. >>> > On any activity by a user's followie on an item, a column is stored i= n >>> 'rowX'. The column has a composite type column name made up of >>> itemId+userId (which makes it unique col. name) in rowX. (& column valu= e >>> contains the activity data related to that item by that followie) >>> > >>> > Now I want to retrieve activity by all users on a list of items. So I >>> need to retrieve all composite columns with composite's first component >>> matching the itemId. Is it possible to do such a query to Cassandra ? I= am >>> using Hector. >>> >> >> > --0016e6de03d3e084de04b5378e4d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

Would you stand by that statement in case all colums inside the super co= lumn need to be read?=A0 Why?

Thanks

Le 28 d=E9c. 2011 19:26, "Edward Capriolo&q= uot; <edlinuxguru@gmail.com= > a =E9crit=A0:
Super columns have the same fundamental problem and perform worse in g= eneral. So switching from composites to super columns is NEVER a good idea.=


On Wed, Dec 28, 201= 1 at 1:19 PM, Aditya <adynnn@gmail.com> wrote:
Since I have around 20 items to query, = I guess making 20 queries to retrieve activities by all followies on all of= those 20 columns would too inefficient, so to=A0take the advantage of more= efficient queries, are supercolumns recommended for this case ? Anyways, i= n case I use supercolumns, I need to retrieve the entire supercolumn at any= point of time & I am writing subcolumn(s) to the supercolumn at differ= ent times not at once.

On Wed, Dec 28, 2011 at 8:07 PM, Edward Capr= iolo <edlinuxguru@gmail.com> wrote:
You need to execute one get slice operation for each item id or if the row = is not large , you can try one large get slice on the entire row and deal w= ith the results client side.

If you try method 1 When doing slices = on composites you can set the start inclusive or exclusive values to get on= ly the column you want and not some extra columns up to slice range size.


On Tuesday, December 27, 2011, Aditya <adynnn@gmail.com> wrote:
> I need to = store data of all activities by user's followies in single row. I am tr= ying to do that making use of composite column names in a single user speci= fic row named 'rowX'.
> On any activity by a user's followie on an item, a column is store= d in 'rowX'. The column has a composite type column name made up of= itemId+userId (which makes it unique col. name) in rowX. (& column val= ue contains the=A0activity=A0data related to that item by that followie) >
> Now I want to retrieve activity by all users on a list of item= s. So I need to retrieve all composite columns with composite's first c= omponent matching the itemId. Is it possible to do such a query to Cassandr= a ? I am using Hector.


--0016e6de03d3e084de04b5378e4d--