Cassandra:集合中项目的最大大小为64K

时间:2014-12-01 13:58:01

标签: cassandra cassandra-2.0 cql3 cqlsh cassandra-cli

如果收集数据超过64K,是否有备用数据。

根据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 个答案:

答案 0 :(得分:0)

在您的情况下,我建议您不要使用C *集合。请改为使用分区键群集列的组合。所以你没有64K的限制。

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