cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: is primary key( foo, bar) the same as primary key ( foo ) with a ‘set' of bars?
Date Sat, 03 Jan 2015 23:48:00 GMT
Indeed this makes sense for map keys and set values, but AFAIU from the 
docs this also applies to map and list _values_: " The maximum size of 
an item in a collection is 64K"

http://www.datastax.com/documentation/cql/3.0/cql/cql_using/use_collections_c.html

Or are collection values also represented as keys?

Sylvain

Le 03/01/2015 20:50, Jack Krupansky a écrit :
> See: https://issues.apache.org/jira/browse/CASSANDRA-5355
>
> "Collections values are currently limited to 64K because the 
> serialized form used uses shorts to encode the elements length (and 
> for sets elements and key map, because they are part of the internal 
> column name that is itself limited to 64K)."
>
> -- Jack Krupansky
>
> On Sat, Jan 3, 2015 at 2:31 PM, Sylvain Wallez <sylvain@apache.org 
> <mailto:sylvain@apache.org>> wrote:
>
>     From what I understand from the docs, the 64k limit applies to
>     both the number of items in a collection and the size of its elements?
>
>     Why is there a constraint on value size in collections, when other
>     types such as blob or text can be larger?
>
>     Thanks,
>     Sylvain
>
>     Le 01/01/2015 20:04, DuyHai Doan a écrit :
>>     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
>>     <mailto: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 <http://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>
>>
>>
>
>
>     -- 
>     Sylvain Wallez -http://bluxte.net
>
>


-- 
Sylvain Wallez - http://bluxte.net


Mime
View raw message