cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan McCall <n...@vervewireless.com>
Subject Re: Using column plus value or only column?
Date Tue, 02 Feb 2010 22:30:05 GMT
Erik,
Sure, you could and depending on the workload, that might be quite
efficient for small pieces of data. However, this also sounds like
something that might be better addressed with the addition of a
SuperColumn on "Sorts" and getting rid of "Data" altogether:

Sorts : {
   sort_row_1 : {
        sortKey1 : { col1:val1, col2:val2 },
        sortKey2 : { col1:val3, col2:val4 }
   }
}

You can have an infinite number of SuperColumns for a key, but make
sure you understand get_slice vs. get_range_slice before you commit to
a design. Hopefully I understood your example correctly, if not, do
you have anything more concrete?

Cheers,
-Nate


On Tue, Feb 2, 2010 at 12:00 PM, Erik Holstad <erikholstad@gmail.com> wrote:
> Thanks Nate for the example.
>
> I was thinking more a long the lines of something like:
>
> If you have a family
>
> Data : {
>   row1 : {
>     col1:val1,
>   row2 : {
>     col1:val2,
>     ...
>   }
> }
>
>
> Using
> Sorts : {
>   sort_row : {
>     sortKey1_datarow1: [],
>     sortKey2_datarow2: []
>   }
> }
>
> Instead of
> Sorts : {
>   sort_row : {
>     sortKey1: datarow1,
>     sortKey2: datarow2
>   }
> }
>
> If that makes any sense?
>
> --
> Regards Erik
>

Mime
View raw message