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

КОМЕНТАРІ • 29

  • @olasupodaniel6774
    @olasupodaniel6774 7 місяців тому +2

    This happens to be the simplest Cassandra DB tutorial I've watched so far, thank you !

    • @irtizahafiz
      @irtizahafiz  7 місяців тому

      Glad it was helpful! I will start posting again soon, so please let me know what type of content interests you the most.

  • @2tce
    @2tce Рік тому +4

    Best explanation for Partition keys. I have spent a lot if time trying to find this. Thanks!!

    • @irtizahafiz
      @irtizahafiz  Рік тому

      So glad it helped you understand better : )

  • @joemobes1632
    @joemobes1632 Рік тому +1

    Thanks for the explanation, very helpful.

  • @humayunhimu6045
    @humayunhimu6045 Рік тому

    wow! happy learning!! thanks

  • @punithore9286
    @punithore9286 2 роки тому

    great explaination👌

  • @sharatchandra9198
    @sharatchandra9198 10 місяців тому

    Excellent and precise explanation

  • @pratapteegala7428
    @pratapteegala7428 Рік тому

    Very nice explanation ...!

  • @RTXXONn
    @RTXXONn Місяць тому

    Awsome content keep going

  • @swetapatel7581
    @swetapatel7581 7 місяців тому

    Great explanation !

  • @samurdi
    @samurdi Рік тому

    Great explanation

  • @jieclarkdev
    @jieclarkdev 8 місяців тому

    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  7 місяців тому

      Thank you! I will start posting again soon, so please let me know what type of content interests you the most.

  • @PranitKothari
    @PranitKothari 3 місяці тому

    Your videos are just amazing

  • @et4493
    @et4493 6 місяців тому

    Good stuff man

  • @astHakobyan
    @astHakobyan 4 місяці тому

    very good video

  • @suhaskurup
    @suhaskurup 2 місяці тому

    20:26 I think you meant to type simple_temperature_v3.

  • @alexandersmirnov4274
    @alexandersmirnov4274 Рік тому

    so why they call it as cluster key and not a sort key?

    • @irtizahafiz
      @irtizahafiz  6 місяців тому +1

      LOL that's a good question.

  • @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 роки тому +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!