Cassandra Documentation

Version:

You are viewing the documentation for a prerelease version.

Creating collections

CQL defines the following collection data types:

Collections are intended for insertion and retrieval as a collection. Thus, Apache Cassandra reads collections in their entirety, and can affect retrieval performance. A good rule of thumb is that sets are more performant than lists, so use a set if you can. Collections should be smaller than the following maximum size to prevent querying delays.

Guard rails for non-frozen collections:

  • No more than 2 billion items in a collection.

  • Maximum size of an item in a set is 65,535 bytes.

  • Maximum size of an item in a list or map is 2 GB.

  • Maximum number of keys in a map is 65,535.

  • Lists can incur a read-before-write operation for some insertions.

Collections are not paged internally.

Collections cannot be sliced;

The limits specified for collections are for non-frozen collections.