incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maxim Veksler <ma...@vekslers.org>
Subject Re: Creating index on part of composite key with Cassandra 1.2.0-beta1
Date Mon, 05 Nov 2012 10:35:11 GMT
OK,

A different question then, Is there any meaning of discussing composite key
not in the context of a table "primary key" ?
For making additional hierarchy inside a single row by using columns.


On Mon, Nov 5, 2012 at 12:14 PM, Sylvain Lebresne <sylvain@datastax.com>wrote:

> 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