cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DuyHai Doan <doanduy...@gmail.com>
Subject Re: is primary key( foo, bar) the same as primary key ( foo ) with a ‘set' of bars?
Date Thu, 01 Jan 2015 19:04:53 GMT
Storage-engine wise, they are almost equivalent, thought there are some
minor differences:

1) with Set structure, you cannot store more that 64kb worth of data
2) collections and maps are loaded entirely by Cassandra for each query,
whereas with clustering columns you can select a slice of columns



On Thu, Jan 1, 2015 at 7:46 PM, Kevin Burton <burton@spinn3r.com> wrote:

> I think the two tables are the same.  Correct?
>
> create table foo (
>
>     source text,
>     target text,
>     primary key( source, target )
> )
>
>
> vs
>
> create table foo (
>
>     source text,
>     target set<text>,
>     primary key( source )
> )
>
> … meaning that the first one, under the covers is represented the same as
> the second.  As a slice.
>
> Am I correct?
>
> --
>
> Founder/CEO Spinn3r.com
> Location: *San Francisco, CA*
> blog: http://burtonator.wordpress.com
> … or check out my Google+ profile
> <https://plus.google.com/102718274791889610666/posts>
> <http://spinn3r.com>
>
>

Mime
View raw message