Database Reference
In-Depth Information
Performance of collection operations
Most collection operations do not involve Cassandra reading data internally; they are
purely write-without-reading, which we recall is the most efficient pattern for Cassandra
data manipulation. Lists, however, are a partial exception to this rule, in three cases as fol-
lows:
• Writing an element at a specific index
• Removing an element at a specific index
• Removing all occurrences of a given value
These three operations do require Cassandra to read the full list before manipulating it, and
are therefore slower than other collection manipulations. It's best to avoid these three oper-
ations in performance-sensitive code.
All other collection updates are entirely write-without-reading, and can thus be performed
very efficiently. In Appendix A , Peeking Under the Hood , we will take a closer look at ex-
actly how collections are stored and updated.
Search WWH ::




Custom Search