Partitioning and Clustering



If you are well versed with Cassandra, then you might know how partitioning and clustering takes place. Here we will focus on a basic understanding of these concepts so that it is easy for us to perform some hands−on on this concept. Partitioning and Clustering in Cassandra can be used with the help of primary keys. Below are the two aspects of primary keys in the context of Cassandra.

Partitioning Column

In Cassandra, a partition is a section or segment where the data is persisted. These partitions are useful in distinguishing the location where data is stored. Due to this it enables Cassandra to read the data faster because all the similar data is packed and stored together in these partitions. When queries these data retrieved together. The query containing equality conditions (= or! =) are queried over these partitioned columns.

Clustering Column

To achieve the uniqueness and ordering of records, Cassandra cluster the columns. The clustered columns help us to query the record using equality and conditional operators such as >=, <= etc.

Advertisements