Partitioning Key vs Clustering Keys in Cassandra | Cassandra Fundamentals

  Рет қаралды 13,601

Code with Irtiza

Code with Irtiza

Күн бұрын

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

Пікірлер: 29
@2tce
@2tce 2 жыл бұрын
Best explanation for Partition keys. I have spent a lot if time trying to find this. Thanks!!
@irtizahafiz
@irtizahafiz 2 жыл бұрын
So glad it helped you understand better : )
@sharatchandra9198
@sharatchandra9198 Жыл бұрын
Excellent and precise explanation
@astHakobyan
@astHakobyan 8 ай бұрын
very good video
@irtizahafiz
@irtizahafiz 8 ай бұрын
Thanks!
@suhaskurup
@suhaskurup 6 ай бұрын
20:26 I think you meant to type simple_temperature_v3.
@olasupodaniel6774
@olasupodaniel6774 11 ай бұрын
This happens to be the simplest Cassandra DB tutorial I've watched so far, thank you !
@irtizahafiz
@irtizahafiz 11 ай бұрын
Glad it was helpful! I will start posting again soon, so please let me know what type of content interests you the most.
@imohsimon9762
@imohsimon9762 Ай бұрын
nice and simple, Thanks so much
@alexandersmirnov4274
@alexandersmirnov4274 Жыл бұрын
so why they call it as cluster key and not a sort key?
@irtizahafiz
@irtizahafiz 10 ай бұрын
LOL that's a good question.
@RTXXONn
@RTXXONn 5 ай бұрын
Awsome content keep going
@irtizahafiz
@irtizahafiz 5 ай бұрын
Appreciate it!
@joemobes1632
@joemobes1632 2 жыл бұрын
Thanks for the explanation, very helpful.
@gregoryweb3
@gregoryweb3 Жыл бұрын
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
@irtizahafiz
@irtizahafiz 11 ай бұрын
Thank you! I will start posting again soon, so please let me know what type of content interests you the most.
@thachnnguyen
@thachnnguyen 2 жыл бұрын
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).
@irtizahafiz
@irtizahafiz 2 жыл бұрын
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!
@humayunhimu6045
@humayunhimu6045 Жыл бұрын
wow! happy learning!! thanks
@pratapteegala7428
@pratapteegala7428 Жыл бұрын
Very nice explanation ...!
@PranitKothari
@PranitKothari 7 ай бұрын
Your videos are just amazing
@irtizahafiz
@irtizahafiz 6 ай бұрын
Thank you so much 😀
@punithore9286
@punithore9286 2 жыл бұрын
great explaination👌
@et4493
@et4493 10 ай бұрын
Good stuff man
@irtizahafiz
@irtizahafiz 10 ай бұрын
Thank you for watching!
@swetapatel7581
@swetapatel7581 11 ай бұрын
Great explanation !
@irtizahafiz
@irtizahafiz 10 ай бұрын
Thank you!
@samurdi
@samurdi 2 жыл бұрын
Great explanation
@irtizahafiz
@irtizahafiz Жыл бұрын
Glad it was helpful!
Channel Plans for 2022
26:27
Code with Irtiza
Рет қаралды 855
Cassandra Database Crash Course
19:48
Code with Irtiza
Рет қаралды 30 М.
Win This Dodgeball Game or DIE…
00:36
Alan Chikin Chow
Рет қаралды 37 МЛН
Every parent is like this ❤️💚💚💜💙
00:10
Like Asiya
Рет қаралды 13 МЛН
pumpkins #shorts
00:39
Mr DegrEE
Рет қаралды 12 МЛН
Time Series Data Modelling in Cassandra
11:12
Code with Irtiza
Рет қаралды 5 М.
05 | Intro to Cassandra - The Art of Data Modeling
17:06
DataStax Developers
Рет қаралды 16 М.
Solving one of PostgreSQL's biggest weaknesses.
17:12
Dreams of Code
Рет қаралды 197 М.
The Birth of SQL & the Relational Database
20:08
Asianometry
Рет қаралды 201 М.
Apache Cassandra - Tutorial 13 - CQL - Materialized Views
9:23
jumpstartCS
Рет қаралды 20 М.
Google SWE teaches systems design | EP19: Cassandra Deep Dive
14:28
Jordan has no life
Рет қаралды 10 М.
AWS DynamoDB Schema Design | How to choose the right key
12:15
Be A Better Dev
Рет қаралды 212 М.
Win This Dodgeball Game or DIE…
00:36
Alan Chikin Chow
Рет қаралды 37 МЛН