Partitioning Key vs Clustering Keys in Cassandra | Cassandra Fundamentals
Вставка
- Опубліковано 26 гру 2021
- Let’s see how different partition keys and clustering keys affect the query performance of your Cassandra tables.
The way you define your Cassandra schema is very important. You should have an idea about your read and write patterns before designing the schema. This will make sure you choose the right partition and clustering keys to organize your data in disk correctly. That way, both your reads and writes can be blazing fast.
Partition key determines which partition your data ends up in. You want to keep partitions small and related data in the same partition. It’s also important to keep in mind that one query should ideally read from one partition.
Clustering key essentially determines the order of data within a partition. Think about your queries and then think about how sorting them differently will make retrieving them much quicker. For instance, if you want the most recent data in most of your queries, have a time_created field as a clustering column and order it in a descending order, so that latest timestamp data is at the top and hence easier to retrieve.
More Cassandra videos:
Cassandra Crash Course: • Cassandra Database Cra...
#cassandra #database #partitionKeys
Visit me at irtizahafiz.com
Contact me at: irtizahafiz9@gmail.com
This happens to be the simplest Cassandra DB tutorial I've watched so far, thank you !
Glad it was helpful! I will start posting again soon, so please let me know what type of content interests you the most.
Best explanation for Partition keys. I have spent a lot if time trying to find this. Thanks!!
So glad it helped you understand better : )
Thanks for the explanation, very helpful.
wow! happy learning!! thanks
great explaination👌
Excellent and precise explanation
Very nice explanation ...!
Awsome content keep going
Appreciate it!
Great explanation !
Thank you!
Great explanation
Glad it was helpful!
Best explanation sir I am stuck on a table which is branch_by_region_country_city but then when I saw this video about compound partition key I understand how to fix my problem , really helppp sir Thanks
Thank you! I will start posting again soon, so please let me know what type of content interests you the most.
Your videos are just amazing
Thank you so much 😀
Good stuff man
Thank you for watching!
very good video
Thanks!
20:26 I think you meant to type simple_temperature_v3.
so why they call it as cluster key and not a sort key?
LOL that's a good question.
Unorganized so wasting time unnecessarily. Doesn't explain why one may need a compound partitioning key. Doesn't explain the impact of clustering keys (i.e., in WHERE clause, although effect in ORDER BY clause is kinda implicitly mentioned).
Hi! Appreciate the feedback.
I thought of explaining those but the video was getting too long. I am still learning what's the best way to present the content. Thanks for your patience!