cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremiah Jordan <jeremiah.jor...@morningstar.com>
Subject Re: Replacing supercolumns with composite columns; Getting the equivalent of retrieving a list of supercolumns by name
Date Wed, 04 Jan 2012 15:41:01 GMT
You can't use a slice range.  But you can query for the specific 
columns.  "4.steve", "5.steve", "6.steve" ... "4.greg", "5.greg", 
"6.greg".  Just have to ask for all of the possible columns you want.

On 01/03/2012 04:31 PM, Stephen Pope wrote:
>   The bonus you're talking about here, how do I apply that?
>
>   For example, my columns are in the form of number.id such as 4.steve, 4.greg, 5.steve,
5.george. Is there a way to query a slice of numbers with a list of ids? As in, I want all
the columns with numbers between 4 and 10 which have ids steve or greg.
>
>   Cheers,
>   Steve
>
> -----Original Message-----
> From: Jeremiah Jordan [mailto:jeremiah.jordan@morningstar.com]
> Sent: Tuesday, January 03, 2012 3:12 PM
> To: user@cassandra.apache.org
> Cc: Asil Klin
> Subject: Re: Replacing supercolumns with composite columns; Getting the equivalent of
retrieving a list of supercolumns by name
>
> The main issue with replacing super columns with composite columns right now is that
if you don't know all your sub-column names you can't select multiple "super columns" worth
of data in the same query without getting extra stuff.  You have to use a slice to get all
subcolumns of a given super column, and you can't have disjoint slices, so if you want two
super columns full, you have to get all the other stuff that is in between them, or make two
queries.
> If you know what all of the sub-column names are you can ask for all of the super/sub
column pairs for all of the super columns you want and not get extra data.
>
> If you don't need to pull multiple super columns at a time with slices like that, then
there isn't really an issue.
>
> A bonus of using composite keys like this, is that if there is a specific sub column
you want from multiple super columns, you can pull all those out with a single multiget and
you don't have to pull the rest of the columns...
>
> So there are pros and cons...
>
> -Jeremiah
>
>
> On 01/03/2012 01:58 PM, Asil Klin wrote:
>> I have a super columns family which I always use to retrieve a list of
>> supercolumns(with all subcolumns) by name. I am looking forward to
>> replace all SuperColumns in my schema with the composite columns.
>>
>> How could I design schema so that I could do the equivalent of
>> retrieving a list of supercolumns by name, in case of using composite
>> columns.
>>
>> (As of now I thought of using the supercolumn name as the first
>> component of the composite name and the subcolumn name as 2nd
>> component of composite name.)

Mime
View raw message