27 Şubat 2023 Pazartesi

Apache Cassandra Primary Key

Giriş
Açıklaması şöyle
Every row in Cassandra is identified by a primary key consisting of two parts:
1. partition key — defining location in the cluster. Partition key hash indicates on which node on the Cassandra cluster the partition is located
2. clustering key — defining row location inside of the partition

Queries by partition key or by partition key and clustering key are fast & efficient. 
Şeklen şöyle


Açıklaması şöyle
Type of Partitioning: Cassandra use a compromise between range based and hash based. You can have a compound primary key consisting of several columns. Only the first part is hashed to determine the partition, other columns are used as concatenated index for sorting the data in SSTables. If a fixed value for first column is specified, range scan can be done efficiently.
Yani Clustering Key sıralama için kullanılır.  Şeklen şöyle




Hiç yorum yok:

Yorum Gönder