From user-return-7611-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Wed Jul 14 22:13:32 2010 Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 8460 invoked from network); 14 Jul 2010 22:13:32 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 Jul 2010 22:13:32 -0000 Received: (qmail 45073 invoked by uid 500); 14 Jul 2010 22:13:30 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 44969 invoked by uid 500); 14 Jul 2010 22:13:30 -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 44961 invoked by uid 99); 14 Jul 2010 22:13:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Jul 2010 22:13:30 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,MIME_QP_LONG_LINE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [208.113.200.5] (HELO blingymail-a1.g.dreamhost.com) (208.113.200.5) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Jul 2010 22:13:21 +0000 Received: from localhost (webms.mac.com [17.148.16.116]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by blingymail-a1.g.dreamhost.com (Postfix) with ESMTP id 119CF5CF3C for ; Wed, 14 Jul 2010 15:13:01 -0700 (PDT) To: user@cassandra.apache.org From: Aaron Morton Subject: Re: key types and grouping related rows together X-Mailer: MobileMe Mail (1C262606) Message-id: <034ae3f4-a1bb-439a-e8a1-b924592ce352@me.com> Content-Type: multipart/alternative; boundary=Apple-Webmail-42--ff176445-ab61-ca24-b986-f30f564dd0e1 MIME-Version: 1.0 In-Reply-To: Date: Wed, 14 Jul 2010 15:13:01 -0700 (PDT) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Webmail-42--ff176445-ab61-ca24-b986-f30f564dd0e1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8; format=flowed The key structure you have should group the keys based on the website. The= re are some differences between range queries with RP and OPP this article= may help=0Ahttp://ria101.wordpress.com/2010/02/22/cassandra-randompartiti= oner-vs-orderpreservingpartitioner/=0A=EF=BB=BF=0AAaron=0A=0A=0AOn 15 Jul,= 2010,at 08:44 AM, S Ahmed wrote:=0A=0A> Where is t= he link that describes the various key types and their impact on sorting? = (I believe I read it before, can't seem to find it now).=0A>=0A> So my app= lication supports multi-tenants, so I need the keys to represent things li= ke:=0A>=0A> website1123 + contentID=0A>=0A> or=0A>=0A> website3454 + userI= D=0A>=0A> And for range queries, these keys have to be grouped together ob= viously.=0A>=0A> What key type would be best suited for this?=0A>=0A>=0A> = I might have to create a CF that maps the website and its key prefix?=0A --Apple-Webmail-42--ff176445-ab61-ca24-b986-f30f564dd0e1 Content-Type: multipart/related; type="text/html"; boundary=Apple-Webmail-86--ff176445-ab61-ca24-b986-f30f564dd0e1 --Apple-Webmail-86--ff176445-ab61-ca24-b986-f30f564dd0e1 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1;
The key structure you have should group the keys based on the website= There are some differences between range queries with RP and OPP this ar= ticle may help
http://ria101.wordpress.com/2010/02/22/cassandra-random= partitioner-vs-orderpreservingpartitioner/

Aaron

=
On 15 Jul, 2010,at 08:44 AM, S Ahmed <sahmed1020@gmail.com> wrot= e:

Where is the link that descr= ibes the various key types and their impact on sorting? (I believe I read = it before, can't seem to find it now).

So my applicatio= n supports multi-tenants, so I need the keys to represent things like:=0A

website1123 + contentID

= or

website3454 + userID

= And for range queries, these keys have to be grouped together obviously.=0A

What key type would be best suited for this?


I might have to create a CF that= maps the website and its key prefix?
=0A
--Apple-Webmail-86--ff176445-ab61-ca24-b986-f30f564dd0e1-- --Apple-Webmail-42--ff176445-ab61-ca24-b986-f30f564dd0e1--