What is a FROZEN collection and what can be a business use case to use it?
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.
DataStax Enterprise is powered by the best distribution of Apache Cassandra ™
© 2023 DataStax, Titan, and TitanDB are registered trademarks of DataStax, Inc. and its subsidiaries in the United States and/or other countries.
Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries.
Privacy Policy Terms of Use