incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Lebresne <sylv...@datastax.com>
Subject Re: Creating index on part of composite key with Cassandra 1.2.0-beta1
Date Mon, 05 Nov 2012 10:14:31 GMT
On Mon, Nov 5, 2012 at 10:53 AM, Maxim Veksler <maxim@vekslers.org> wrote:

> Are indexes on composite column supported ?
>

Index on any part of the PRIMARY KEY is not supported (whether the PRIMARY
KEY is composite or not btw), not yet at least.


> If not, a suggestion for a work around?
>

In your case, you're asking for an index on the first component of the
PRIMARY KEY, which is non-sensical in the sense that this component is
already always "indexed".

If you want all the rows whose campaignId = 3, just do SELECT FROM
userinfo2 WHERE campaignId = 3.

--
Sylvain

Mime
View raw message