incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Ellis <jbel...@gmail.com>
Subject Re: ColumnFamilies vs composite rows in one table.
Date Fri, 05 Mar 2010 19:08:25 GMT
Generally, you want to have different types of data in different CFs
so you can tune them separately (key / row caches).

Mixing different row types in one CF also makes doing get_slice_range
scans difficult.

On Fri, Mar 5, 2010 at 12:04 PM, Erik Holstad <erikholstad@gmail.com> wrote:
> What are the benefits of using multiple ColumnFamilies compared to using a
> composite
> row name?
>
> Example: You have messages that you want to index on sent and to.
>
> So you can either have
> ColumnFamilyFrom:userTo:{userFrom->messageid}
> ColumnFamilyTo:userFrom:{userTo->messageid}
>
> or something like
> ColumnFamily:user_to:{user1_messageId, user2_messageId}
> ColumnFamily:user_from:{user1_messageId, user2_messageId}
>
> One thing that I can see the advantage of using families are if you want to
> use different types in the families. But are there others? Like storage
> space,
> read/write speeds etc.
>
> --
> Regards Erik
>

Mime
View raw message