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 408B764CC for ; Tue, 12 Jul 2011 11:47:02 +0000 (UTC) Received: (qmail 69727 invoked by uid 500); 12 Jul 2011 11:46:59 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 69426 invoked by uid 500); 12 Jul 2011 11:46:53 -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 69418 invoked by uid 99); 12 Jul 2011 11:46:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jul 2011 11:46:52 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of osishkin@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; Tue, 12 Jul 2011 11:46:44 +0000 Received: by ywp31 with SMTP id 31so1519738ywp.31 for ; Tue, 12 Jul 2011 04:46:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:reply-to:date:message-id:subject:from:to:content-type; bh=BVs2zwGdOoCQtEvt7hNSYP3CEV2u4iZDs5HtI/8CtPU=; b=j3ctlQvMpDVgnPhpZmmcLBJqMHxDTt7e+/Y1zcmrMLgUsXpJ9UJSv0v1xNVIMGqP3k bYxAWEkIkgfNqcoExaZl9sqJnOFAKP3dkLjRQnbVe3y3tphMMJFafdt+TiMTH+d7tBKx L7hrsT9K7/R7c9hcX3gtofJbdzTVbAKagfZRk= MIME-Version: 1.0 Received: by 10.236.185.134 with SMTP id u6mr7012618yhm.76.1310471183263; Tue, 12 Jul 2011 04:46:23 -0700 (PDT) Received: by 10.146.84.20 with HTTP; Tue, 12 Jul 2011 04:46:23 -0700 (PDT) Reply-To: osishkin@gmail.com Date: Tue, 12 Jul 2011 14:46:23 +0300 Message-ID: Subject: Predefined columns for Secondary index From: osishkin osishkin To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org I'm thinking about Secondary indexes as an alternative for using column families to index my data. I'd appreciate some answers to basic questions about this new feature. 1. Can you insert a row to a column family with a predefined column metadata (and secondary index for these columns) that does not contain one/all of the predifened columns? will Cassnadra insert a dummy column? 2. And also ,how will a query on a column that is indexed treat the above situation? is there a performance penalty? If I use an example from Datastax: > create column family users with comparator=UTF8Type ... and column_metadata=[{column_name: full_name, validation_class: UTF8Type}, ... {column_name: birth_date, validation_class: LongType, index_type: KEYS}]; set users[bsanderson][full_name] = 'Brandon Sanderson'; set users[bsanderson][birth_date] = 1975; set users[msanderson][full_name] = 'Michael Sanderson'; and now I query > get users where birth_date = 1975; Thank you