cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Morton <aa...@thelastpickle.com>
Subject Re: Efficienct RangeSlice of SuperColumn and Columns in one call
Date Wed, 17 Nov 2010 03:08:02 GMT
Super columns have some limitations http://wiki.apache.org/cassandra/CassandraLimitations

it's not possible to bring back a range of super columns, as you say you can specify one or
zero super column names in your ColumnParent. 

You could use standard CF's, and do two reads. First one would be the Super Col part of your
query below to find the first day. Second would be to get all the values for that day from
one row. You can treat cassandra as an indexing building machine, and make a couple of requests
to get your final data. 

There are also index operations available in 0.7. I'm not up to date enough with them to recommend
an approach. 

Hope that helps. 

Aaron


On 17 Nov, 2010,at 03:21 PM, E S <tr1sklion@yahoo.com> wrote:

I am going to have a supercolumn family where some rows can be quite large 
(10-100 mb). I'd like to be able to pull a subset of this data without having 
to pull the whole thing into memory and send it over the wire.

Each query will be for only one row. The supercolumn key and the child column 
keys are going to be dates. I want to query:

"For row 123, give me all the column values whose date are between 1/1/2000 and 
1/1/2005 for the first supercolumn whose date is before 1/1/2009."

Since super columns and columns are sorted by date, it seems like it should be 
pretty efficient to do this in 1 query, but I can't figure out how to do this in 
the API. If I knew the super column name, I could do a slicerange for the key 
with the target supercolumn as parent on a range of dates (1/1/2000-1/1/2005), 
but I only know that I want the first supercolumn before a date.

Thanks for any help!




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
    • Unnamed multipart/related (inline, None, 0 bytes)
View raw message