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 874FC104BA for ; Fri, 6 Sep 2013 13:18:49 +0000 (UTC) Received: (qmail 29269 invoked by uid 500); 6 Sep 2013 13:18:47 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 28860 invoked by uid 500); 6 Sep 2013 13:18:46 -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 28852 invoked by uid 99); 6 Sep 2013 13:18:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Sep 2013 13:18:45 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of petter.von.dolwitz@gmail.com designates 209.85.220.176 as permitted sender) Received: from [209.85.220.176] (HELO mail-vc0-f176.google.com) (209.85.220.176) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Sep 2013 13:18:40 +0000 Received: by mail-vc0-f176.google.com with SMTP id lf11so2104185vcb.7 for ; Fri, 06 Sep 2013 06:18:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=ultsWLR3DszwzpFFGsQmb9l0XtEQIDG02Bd31Ix/UUg=; b=LhKA5WSSGbF7drL8j6zXISJu7qMBMAhmzwqXy5zRn86V8bpdgvaE1//a3u46cNJKSZ wHfyWXNBhQR5zZ43spRE3ZK1Lge4Lz9zFX9cNc6G+3OLlT2dDqzAYVfK7wVAqLCeDAAo 3GzYCCYaefAIiIhsTzM0dzzbV8XK+LAILrub4Ipt7O+e6WmVmtSlqBearM8RujxXJRCO Q0zvqQin+CR/he/bGJzGo19UPlaWQuqJIxzkYW8ZQkwV9ecEnlUAzKqTn1v+YRYAcHWs 4va1EQ8b1wFK33/RuJ+mIVqMtNYOVJQ5XDL6MSJSuV7mjxBdbmDVIRdr8RBnLGg2r5W5 /0rg== MIME-Version: 1.0 X-Received: by 10.52.117.68 with SMTP id kc4mr1973808vdb.0.1378473499983; Fri, 06 Sep 2013 06:18:19 -0700 (PDT) Received: by 10.221.44.8 with HTTP; Fri, 6 Sep 2013 06:18:19 -0700 (PDT) Date: Fri, 6 Sep 2013 15:18:19 +0200 Message-ID: Subject: Cannot get secondary indexes on fields in compound primary key to work (Cassandra 2.0.0) From: "Petter von Dolwitz (Hem)" To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=bcaec54866724c899504e5b6df28 X-Virus-Checked: Checked by ClamAV on apache.org --bcaec54866724c899504e5b6df28 Content-Type: text/plain; charset=ISO-8859-1 I am struggling with getting secondary indexes to work. I have created secondary indexes on some fields that are part of the compound primary key but only one of the indexes seems to work (the one set on the field 'e' on the table definition below). Using any other secondary index in a where clause causes the message "Request did not complete within rpc_timeout.". It seems like if a put a value in the where clause that does not exist in a column with secondary index then cassandra quickly return with the result (0 rows) but if a put in a value that do exist I get a timeout. There is no exception in the logs in connection with this. I've tried to increase the timeout to a minute but it does not help. I am currently running on a single machine with 12 GB RAM and the heap set to 8 GB. The table and indexes occupy 1 GB of disk space. I query the table with cqlsh. The below issue should have fixed something in this area. Is this still a problem or is it something in my environmnet/design that is the problem? https://issues.apache.org/jira/browse/CASSANDRA-5851 /Petter ----TABLE DEFINITION----- CREATE TABLE x.y ( a varchar, b varchar, c varchar, d varchar, e varchar, f varchar, g varchar, h varchar, i int, j varchar, k varchar, l timestamp, m blob, PRIMARY KEY (a, b, c, d, e, f, g, h, i, j, k, l) ); CREATE INDEX d_idx ON x.y ( d ); CREATE INDEX e_idx ON x.y ( e ); CREATE INDEX f_idx ON x.y ( f ); CREATE INDEX g_idx ON x.y ( g ); CREATE INDEX h_idx ON x.y ( h ); CREATE INDEX i_idx ON x.y ( i ); CREATE INDEX j_idx ON x.y ( j ); CREATE INDEX k_idx ON x.y ( k ); --bcaec54866724c899504e5b6df28 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I am struggling with getting secondary indexes to wor= k. I have created secondary indexes on some fields that are part of the com= pound primary key but only one of the indexes seems to work (the one set on= the field 'e' on the table definition below). Using any other seco= ndary index in a where clause causes the message "Request did not comp= lete within rpc_timeout.". It seems like if a put a value in the where= clause that does not exist in a column with secondary index then cassandra= quickly return with the result (0 rows) but if a put in a value that do ex= ist I get a timeout. There is no exception in the logs in connection with t= his. I've tried to increase the timeout to a minute but it does not hel= p.

I am currently running on a single machine with 12 GB RAM and the= heap set to 8 GB. The table and indexes occupy 1 GB of disk space. I query= the table with cqlsh.

The below issue should have fixed someth= ing in this area. Is this still a problem or is it something in my environm= net/design that is the problem?
https://is= sues.apache.org/jira/browse/CASSANDRA-5851

/Petter

----TABLE DEFINITION-----

CREATE TABLE x.= y (
=A0 a varchar,
=A0 b varchar,
=A0 c varchar,
=A0 d varchar,
=A0= e varchar,
=A0 f varchar,
=A0 g varchar,
=A0 h varchar,
=A0 i = int,
=A0 j varchar,
=A0 k varchar,
=A0 l timestamp,
=A0 m blob,=
=A0 PRIMARY KEY (a, b, c, d, e, f, g, h, i, j, k, l)
);

CREATE INDEX d_idx
=A0 ON x.y ( d );

CREATE INDEX e_idx=
=A0 ON x.y ( e );

CREATE INDEX f_idx
=A0 ON x.y ( f );
CREATE INDEX g_idx
=A0 ON x.y ( g );

CREATE INDEX h_idx
=A0 O= N x.y ( h );

CREATE INDEX i_idx
=A0 ON x.y ( i );

CREATE INDEX j_idx
= =A0 ON x.y ( j );

CREATE INDEX k_idx
=A0 ON x.y ( k );
<= /div> --bcaec54866724c899504e5b6df28--