Cassandra : The maximum size of an item in a collection is 64K

1.1k views Asked by At

Is there is an alternate if collection data is more than 64K.

According to cassandra doc

Observe the following limitations of collections:

The maximum size of an item in a collection is 64K.
Keep collections small to prevent delays during querying because Cassandra reads a collection in its entirety. The collection is not paged internally.

As discussed earlier, collections are designed to store only a small amount of data.
Never insert more than 64K items in a collection.

If you insert more than 64K items into a collection, only 64K of them will be queryable, resulting in data loss.
1

There are 1 answers

2
codejitsu On

In your case I would suggest you not to use the C* collections. Use the combination of partition key and clustering columns instead. So you don't have the 64K limit.

Link: http://www.datastax.com/documentation/cql/3.0/cql/ddl/ddl_compound_keys_c.html