Horizontal vs Vertical Database Partitioning

preview_player
Показать описание
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

💾 Database Engineering Videos

🛰 Network Engineering Videos

🏰 Load Balancing and Proxies Videos

🐘 Postgres Videos

🚢Docker

🧮 Programming Pattern Videos

🛡 Web Security Videos

🦠 HTTP Videos

🐍 Python Videos

🔆 Javascript Videos

Support me on PayPal

Become a Patreon

Stay Awesome,
Hussein
Рекомендации по теме
Комментарии
Автор

I have never seen a YouTuber with so much backend knowledge, experience and a succent manner of presenting ideas.

Nnonymus
Автор

People around Hussein: look he's doing vlog! Let's go check out what he's talking about this beautiful place!
Also people: wtf

GoddamnAxl
Автор

The only individual whose videos I watch in their whole without forwarding or adjusting the playback speed.

RohitSaini
Автор

I thought querying the correct partition needs to be handled by the application. The post-production bit cleared the doubt. Thanks!

RanjithVj
Автор

Thanks Hussein, you are my best teacher!

bsen
Автор

Happy new year Nasser. Your content is very underrated.

saiteja-guqr
Автор

My, my ! If I were at that beach, I'll sit down quietly near you to hear it.

alexkim
Автор

Got confused in an online class😂... Came and watched this video... Back on track... Now back to class😂😂

vincekwame
Автор

Really amazing post simple & clear !! keep the good work:) Big Big thank you

sweathajeyaprakash
Автор

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?

mShady
Автор

Thanks a lot it was big help... wish there was a video on Horizontal Partitioning vs Sharding.. based on this video.

true_fact_
Автор

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!

timbui
Автор

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?

nathanbenton
Автор

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 ?

aldosusanto
Автор

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 ?

yanetfors
Автор

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?

ParthPatel-fplm
Автор

Humans saw this(nature) and developed C++ got real XD

rajatgoyal
Автор

Great video but had to just listen instead of watch because got kinda motion sick :(

bd