Database Sharding

what is Sharding?

Sharding (means partitioning) is a technique used for database design pattern, which means separating the columns or dividing the rows into the multiple tables and each table will runs on separate machine. It's a common strategy employed in distributed database systems to improve scalability, performance, and availability. This sharding is related to horizontal sharding.

Vertical sharding vs Horizontal sharding

Vertical sharding means dividing the columns or attributes and placed in sperate databases.

Horizontal sharding means sharding or partitioning the table into the different rows which is stores in different databases.

Logical sharding vs Physical sharding

physical sharding means placing the data items in the different databases and logical sharding means how much data should be placed in one database.

Try all optimization ways before going to sharding.

Advantages of Sharding

-> optimization of query retrieval data.

Disadvantages of Sharding

->Data partition distribution is unevenness then load of the database increases we get hotspots

->Difficult to combine the distrusted partition databases