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 900C5DC4C for ; Fri, 21 Sep 2012 03:01:41 +0000 (UTC) Received: (qmail 56336 invoked by uid 500); 21 Sep 2012 03:01:39 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 56310 invoked by uid 500); 21 Sep 2012 03:01:38 -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 56197 invoked by uid 99); 21 Sep 2012 03:01:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Sep 2012 03:01:33 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tyler@datastax.com designates 209.85.220.172 as permitted sender) Received: from [209.85.220.172] (HELO mail-vc0-f172.google.com) (209.85.220.172) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Sep 2012 03:01:25 +0000 Received: by vcbfo14 with SMTP id fo14so3640152vcb.31 for ; Thu, 20 Sep 2012 20:01:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=2u8ZptsXsItuliw/4VGfyKPz8KGyC/dwMaAbAfVa/9U=; b=pnaL7wFtMtpA5DcUyegBEoJKRTdT9sI9GWG+Krsi6NCjt5d0WJf0rocGWHTYPHFtsf lflTriTYeqlkISEVW8AMNGe0W98XJ9UTKMd9e3yOkxefse6ROWsglmIBhaTKZKRvoxB+ W0riTQ4hACAuBiMUuAnFfy72cur428NjP2TrIwutVX7V2J5RY/1WvZOmZi4MnYpo3ehV Jeyx2hiGNe1xwBaWWDcNaJ58DCJ1kuezHACwrvtxgKq3JcPwPiny1Yh30YJd8ydRuvzc 4Ju1yM9EuS+GwKoLFEtia4AL3hlVRtL9lHs980I3k+w/wC8fS+C7WOCvgbHBKozCCGtn 941w== MIME-Version: 1.0 Received: by 10.52.88.19 with SMTP id bc19mr1818924vdb.39.1348196464152; Thu, 20 Sep 2012 20:01:04 -0700 (PDT) Received: by 10.59.0.102 with HTTP; Thu, 20 Sep 2012 20:01:04 -0700 (PDT) In-Reply-To: References: Date: Thu, 20 Sep 2012 22:01:04 -0500 Message-ID: Subject: Re: Should row keys be inserted in ascending order? From: Tyler Hobbs To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=20cf3071ca1455512004ca2d738e X-Gm-Message-State: ALoCoQmBtZm1YbKrlPjtKnD0TdgLycdodtqKP2MeI1y34qVgVF+uYT+TJ2dCOE916yGcRJgzSUmH --20cf3071ca1455512004ca2d738e Content-Type: text/plain; charset=ISO-8859-1 Rows are actually stored on disk in the order of the hash of their keys when using RandomPartitioner. Furthermore, the rows are stored in SSTables, which are immutable, and are periodically compacted together. There's no shifting involved. This gives an overview: http://wiki.apache.org/cassandra/MemtableSSTable On Thu, Sep 20, 2012 at 7:52 PM, Cory Mintz wrote: > The DataModel page in the Cassandra Wiki ( > http://wiki.apache.org/cassandra/DataModel) says: > > > > "In Cassandra, each column family is stored in a separate file, and the > file is sorted in row (i.e. key) major order." > > > > Does this mean that new row keys should be ascending? If they are not > ascending does that mean all > > of the data after the new key needs to be shifted down? > > > Thanks. > > Cory > -- Tyler Hobbs DataStax --20cf3071ca1455512004ca2d738e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Rows are actually stored on disk in the order of the hash of their keys whe= n using RandomPartitioner.

Furthermore, the rows are stored in SSTab= les, which are immutable, and are periodically compacted together.=A0 There= 's no shifting involved.=A0 This gives an overview: http://wiki.apache.org/cassandra/= MemtableSSTable

On Thu, Sep 20, 2012 at 7:52 PM, Cory Mintz = <cory.p.mintz@gmail.com> wrote:

The DataModel page in the Cassandra Wiki (http://wiki.= apache.org/cassandra/DataModel) says:

=A0

"In Cassandra, each column family is stored in = a separate file, and the file is sorted in row (i.e. key) major order."<= /p>

=A0

Does this mean that ne= w row keys should be ascending? If they are not ascending does that mean al= l

of the data after the new key needs to be shift= ed down?


Thanks.

Cory




--
Tyler Hobbs
DataStax
<= br> --20cf3071ca1455512004ca2d738e--