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 4D2547A68 for ; Mon, 18 Jul 2011 16:44:12 +0000 (UTC) Received: (qmail 51706 invoked by uid 500); 18 Jul 2011 16:44:07 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 51351 invoked by uid 500); 18 Jul 2011 16:44:06 -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 51337 invoked by uid 500); 18 Jul 2011 16:44:06 -0000 Delivered-To: apmail-incubator-cassandra-user@incubator.apache.org Received: (qmail 51334 invoked by uid 99); 18 Jul 2011 16:44:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Jul 2011 16:44:06 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.212.47] (HELO mail-vw0-f47.google.com) (209.85.212.47) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Jul 2011 16:43:57 +0000 Received: by vws2 with SMTP id 2so2553417vws.6 for ; Mon, 18 Jul 2011 09:43:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.75.170 with SMTP id d10mr2706100vdw.160.1311007416350; Mon, 18 Jul 2011 09:43:36 -0700 (PDT) Sender: scode@scode.org Received: by 10.52.166.136 with HTTP; Mon, 18 Jul 2011 09:43:36 -0700 (PDT) X-Originating-IP: [213.114.147.131] In-Reply-To: <1311006328710-6595415.post@n2.nabble.com> References: <1311006328710-6595415.post@n2.nabble.com> Date: Mon, 18 Jul 2011 18:43:36 +0200 X-Google-Sender-Auth: JOCGhacPOHCnkUKwbQSuqvD9W-c Message-ID: Subject: Re: How are column sort handled? From: Peter Schuller To: user@cassandra.apache.org Cc: cassandra-user@incubator.apache.org Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org > Trying to understand the overhead when multiple columns are spread accross > ssTables. For eg: Key K1 column b and c are in ssTable 1 and column a in > ssTable 2. As I understand columns in a given row are sorted at the time > it's stored. So does it mean that when "a" goes to ssTable 2 it also fetches > column "b" and "c" from ssTable 1 and writes a,b,c in ssTable 2? Or in this > case the sorting occurs on the columnSlice read call? Currently, the only time data is "moved" to other sstables is during compaction. When sstable 2 is flushed containing column "a", that causes subsequent reads for data in the row to have to read from sstable 1 and 2 both. At some future point where sstable 1 and sstable 2 participate in a compaction, they will be merged (or indirectly later on if they don't directly participate in a compaction). This is why slowly spreading out writes over lots of rows over time can decrease read performance, as the average row can become more spread out over multiple sstables. This is one potential driver for compaction. -- / Peter Schuller (@scode on twitter)