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 4841C10B19 for ; Wed, 11 Dec 2013 22:42:36 +0000 (UTC) Received: (qmail 96578 invoked by uid 500); 11 Dec 2013 22:42:33 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 96552 invoked by uid 500); 11 Dec 2013 22:42:33 -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 96544 invoked by uid 99); 11 Dec 2013 22:42:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Dec 2013 22:42:33 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of onlinespending@gmail.com designates 209.85.192.175 as permitted sender) Received: from [209.85.192.175] (HELO mail-pd0-f175.google.com) (209.85.192.175) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Dec 2013 22:42:26 +0000 Received: by mail-pd0-f175.google.com with SMTP id w10so10356597pde.20 for ; Wed, 11 Dec 2013 14:42:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; bh=/3xn5XgyS+xmAX8AYtJ2Ggn6jFgKAqs4ZsLoDYXIwvc=; b=A3/EnNb+2N4uYM6Khm7vETrfQNQZR/KYqD/HD49aKsSBNk0H8Rwr2TOZexBIk8Tw8h 8WtzsnuhZI7E0pTlHNe/MHUFEA56f2JVyJGQZYqlsINXEvfxHPX1syvW05lS1jrWkA8o He0fh33SxEP64hawcK6Fy6r2RIs8SnHdmuq2RODZ58JIxg9Qmr3+CbChw+ccRX00Tdja yiYe25yEzoH2G/MdZZu+UZ9vNycxddH7iDfSmxrpg70vqFSSGHY86jqp5XC/+p7vXG8J q6XqiPGHPZnFihZF58p9iAs5gsOdfqsguwrK9NHP0XNC2fTo1TDdprAUC9WilyU3glh0 07mA== X-Received: by 10.68.243.99 with SMTP id wx3mr5435709pbc.29.1386801724922; Wed, 11 Dec 2013 14:42:04 -0800 (PST) Received: from host-247-195.pubnet.pdx.edu (host-247-195.pubnet.pdx.edu. [131.252.247.195]) by mx.google.com with ESMTPSA id gf5sm35217285pbc.22.2013.12.11.14.42.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 11 Dec 2013 14:42:03 -0800 (PST) From: onlinespending Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: efficient way to store 8-bit or 16-bit value? Message-Id: <8DF6CE20-E70E-4107-8EC0-FE344C1D7382@gmail.com> Date: Wed, 11 Dec 2013 14:42:02 -0800 To: user@cassandra.apache.org Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) X-Mailer: Apple Mail (2.1822) X-Virus-Checked: Checked by ClamAV on apache.org What do people recommend I do to store a small binary value in a column? = I=92d rather not simply use a 32-bit int for a single byte value. Can I = have a one byte blob? Or should I store it as a single character ASCII = string? I imagine each is going to have the overhead of storing the = length (or null termination in the case of a string). That overhead may = be worse than simply using a 32-bit int. Also is it possible to partition on a single character or substring of = characters from a string (or a portion of a blob)? Something like: CREATE TABLE test ( id text, value blob, PRIMARY KEY (string[0:1]) )=20=