Horizontal vs Vertical Database Partitioning

  Рет қаралды 36,924

Hussein Nasser

Hussein Nasser

Күн бұрын

In this video I explain what database partitioning is and illustrate the difference between Horizontal vs Vertical Partitioning, benefits and much more.
0:00 Intro
1:00 Why Partitioning?
3:00 Horizontal Partitioning?
5:50 Vertical Partitioning?
Benefits of Partitioning
Indexes are smaller (quick index scans)
Allows DB optimizer to sequence scan the partition instead of index
Split table by columns (vertically) and put the columns with the entire slice into another table (blobs) Example fields that are blobs can be put in another table in another tablespace that is stored in hard disc vs the rest of the data goes to your SSD
Types
Range partitioning
Range queries within a key ..
List partitioning
Discrete values- countries
Hash partitioning
Consistent hashing based on a value, hard to add to new partition
🏭 Software Architecture Videos
• Software Architecture
💾 Database Engineering Videos
• Database Engineering
🛰 Network Engineering Videos
• Network Engineering
🏰 Load Balancing and Proxies Videos
• Proxies
🐘 Postgres Videos
• PostgresSQL
🚢Docker
• Docker
🧮 Programming Pattern Videos
• Programming Patterns
🛡 Web Security Videos
• Web Security
🦠 HTTP Videos
• HTTP
🐍 Python Videos
• Python by Example
🔆 Javascript Videos
• Javascript by Example
👾Discord Server / discord
Support me on PayPal
bit.ly/33ENps4
Become a Patreon
/ hnasr
Stay Awesome,
Hussein

Пікірлер: 44
@cadddie-ai
@cadddie-ai 3 жыл бұрын
I have never seen a KZbinr with so much backend knowledge, experience and a succent manner of presenting ideas.
@GoddamnAxl
@GoddamnAxl 3 жыл бұрын
People around Hussein: look he's doing vlog! Let's go check out what he's talking about this beautiful place! Also people: wtf
@RohitSaini52945
@RohitSaini52945 2 жыл бұрын
The only individual whose videos I watch in their whole without forwarding or adjusting the playback speed.
@RanjithVj404
@RanjithVj404 3 жыл бұрын
I thought querying the correct partition needs to be handled by the application. The post-production bit cleared the doubt. Thanks!
@alexkim7270
@alexkim7270 3 жыл бұрын
My, my ! If I were at that beach, I'll sit down quietly near you to hear it.
@saiteja-gu2qr
@saiteja-gu2qr 4 жыл бұрын
Happy new year Nasser. Your content is very underrated.
@hnasr
@hnasr 4 жыл бұрын
sai teja thank you so much! Glad you are enjoying the content, happy new year 🎊
@bsen2267
@bsen2267 Жыл бұрын
Thanks Hussein, you are my best teacher!
@muskduh
@muskduh 2 жыл бұрын
Great free video!! Thank you!
@Diarmuidism
@Diarmuidism 4 жыл бұрын
This was a big help, thank you.
@hnasr
@hnasr 4 жыл бұрын
Glad I could help Diarmuid! 😊
@ynternet1
@ynternet1 2 жыл бұрын
Thank you so much for this video!!!
@sweathajeyaprakash1814
@sweathajeyaprakash1814 4 жыл бұрын
Really amazing post simple & clear !! keep the good work:) Big Big thank you
@hnasr
@hnasr 4 жыл бұрын
Sweatha Jeyaprakash thank you for your comment 🙏 glad you liked the content
@mrkiwiboy2011
@mrkiwiboy2011 4 жыл бұрын
Loved the post note ! thank you
@hnasr
@hnasr 4 жыл бұрын
Thanks Marie 🙏
@WafaPRO
@WafaPRO 3 жыл бұрын
Amazing start
@MsAneesh007
@MsAneesh007 3 жыл бұрын
Thank you!
@aminalakhras
@aminalakhras 3 жыл бұрын
I love you ! Thanks
@dhenukarangam2799
@dhenukarangam2799 2 жыл бұрын
Awesome 👏
@true_fact_100
@true_fact_100 4 жыл бұрын
Thanks a lot it was big help... wish there was a video on Horizontal Partitioning vs Sharding.. based on this video.
@hnasr
@hnasr 4 жыл бұрын
Amay Shanbhag thanks !! There is a video on Sharding Database Sharding Crash Course (with Postgres examples) kzbin.info/www/bejne/mmLJiXWCptN5rMU
@ParthPatel-fp8lm
@ParthPatel-fp8lm 3 жыл бұрын
Hello, thanks for the video. I have one question. In vertical partitioning, we need to keep partition key also along with the large columns to separate, correct? If we do not keep partition key, how will it search in that column?
@mShady
@mShady 3 жыл бұрын
Just watched your sharding video and now watching this one. Awesome stuff! Just a quick question, isn't vertical partitioning just the old good db normalization? Or am I over simplifying?
@hnasr
@hnasr 3 жыл бұрын
Interesting, if you think about it its actually is normalizing at data model level (how you see it as a user) vs vertical partition is done at the deep database storage level which is not visible to you as clearly. good thoughts
@timbui5556
@timbui5556 2 жыл бұрын
Hi Hussein, thank you for making this instructional video. We can find many sources on the web how to do horizontal partitioning. Can you show us where we can learn how to do vertical partitioning in Postgres? Thank you again!
@nathanbenton2051
@nathanbenton2051 3 жыл бұрын
Awesome video! Comparing this stuff to the overall Snowflake architecture would be quite interesting - is something like that possibly on the roster for future videos?
@markarmon2883
@markarmon2883 3 жыл бұрын
Fansatic!
@brandonjarrett4314
@brandonjarrett4314 2 жыл бұрын
Hilarious and informative.
@yanetfors1007
@yanetfors1007 3 жыл бұрын
Hi Hussein. Thanks for this amazing video. I have a doubt if I need to do a partition by range based on a date column, how should I know what is the best range? For instance partitioning by weeks or months ?
@yanetfors1007
@yanetfors1007 3 жыл бұрын
I suppose you should check the numbers of rows, but which would be an acceptable number of rows for a partition and which won't?
@aldosusanto
@aldosusanto 3 жыл бұрын
Correct me if im wrong, but I think there are better methods to solve the vertical partitioning problem (where we have a heavy blob column), I came up with two: 1) I believe we can just use JPA Projection to query specific columns only, so when we do the query, we dont have to take all the columns of that entry, we just grab the columns that we need. 2) What about creating another table just for the blob column then (with an FK connecting both tables of course) ? I know that this seems like a messy solution, but isn't vertical partitioning also as messy? :) Is vertical partitioning still better than both cases above? if so, why ?
@hnasr
@hnasr 3 жыл бұрын
Vertical partitioning is what you described in 2 You can of course query for what you want but your paying cost of storage of that blob field in your table space
@NineBerry
@NineBerry 2 жыл бұрын
Shards event coming?
@B-Billy
@B-Billy 3 жыл бұрын
Watching it on 1st January, 2020😂
@patricknebe6030
@patricknebe6030 3 жыл бұрын
🤣 *2021
@MrElipis
@MrElipis Жыл бұрын
2023
@weevolve4180
@weevolve4180 Жыл бұрын
Lost brother of Hugh Jackman😂
@bd3723
@bd3723 3 жыл бұрын
Great video but had to just listen instead of watch because got kinda motion sick :(
@hnasr
@hnasr 3 жыл бұрын
Sorry about that, I made a better video on partitioning that will come in the coming weeks
@bd3723
@bd3723 3 жыл бұрын
@@hnasr oh no worries! Just constructive feedback! Totally grateful for the content 😊
Avoid premature Database Sharding
20:29
Hussein Nasser
Рет қаралды 15 М.
How Do Databases Store Tables on Disk? Explained both SSD & HDD
18:56
Hussein Nasser
Рет қаралды 26 М.
The day of the sea 🌊 🤣❤️ #demariki
00:22
Demariki
Рет қаралды 106 МЛН
孩子多的烦恼?#火影忍者 #家庭 #佐助
00:31
火影忍者一家
Рет қаралды 47 МЛН
Became invisible for one day!  #funny #wednesday #memes
00:25
Watch Me
Рет қаралды 52 МЛН
Always be more smart #shorts
00:32
Jin and Hattie
Рет қаралды 47 МЛН
Data Normalization vs Denormalization - Which is better when ?
12:28
Partitioning | Postgres.FM 040 | #PostgreSQL #Postgres podcast
40:03
PostgresTV 💙💛
Рет қаралды 1,4 М.
System Design - Sharding | Data Partitioning
11:22
Coding Simplified
Рет қаралды 39 М.
100+ Linux Things you Need to Know
12:23
Fireship
Рет қаралды 611 М.
Column vs Row Oriented Databases Explained
34:16
Hussein Nasser
Рет қаралды 73 М.
What is Database Sharding?
26:56
Be A Better Dev
Рет қаралды 151 М.
PART 52 || DIY Wireless Switch forElectronic Lights - Easy Guide!
1:01
HUBAB__OFFICIAL
Рет қаралды 28 МЛН
OZON РАЗБИЛИ 3 КОМПЬЮТЕРА
0:57
Кинг Комп Shorts
Рет қаралды 772 М.
Опыт использования Мини ПК от TECNO
1:00
Андронет
Рет қаралды 627 М.