What is a FROZEN collection and what can be a business use case to use it?
Freezing a collection essentially make the collection values immutable. Frozen collections are treated like blobs, any upsert overwrites the entire value. You cannot update individual fields of frozen collections.
An important note about non-frozen collections from the DataStax docs:
In a non-frozen collection, a tombstone is created for an insert and a non-incremental update in the collection. An incremental update adds a value to an existing value in the collection. The inserts and non-incremental updates for a non-frozen collection can cause large numbers of tombstones.
This creation of tombstones might not be an obvious side-effect of updating collections, especially if you are not explicitly deleting any data, and large numbers of tombstones will affect read performance.
Another aspect of frozen collections is that they can be used as part of primary keys, where non-frozen collections cannot be used.
These aspects should help to decide whether you want to freeze a collection or not.
I hope this helps!
7 People are following this question.