Exploring Sharding & Partitioning — Part 1 (Sharding & Partitioning in MySQL)

Venkatesh Subramanian
5 min readApr 6, 2024

Let’s explore sharding and partitioning across diverse database types. Whether you’re dealing with traditional relational databases or cutting-edge NoSQL solutions, understanding sharding and partitioning is essential for optimizing your data infrastructure.

This series consists of two parts: the first delves into sharding within relational databases, while the second focuses on sharding and partitioning in NoSQL databases and data warehouses.

Sharding vs Partitioning

  • Sharding usually involves dividing a database across multiple database instances.
  • Partitioning is about dividing a database within the same database instance.

Let's take the example of millions of users

The original table can be split into sub-tables based on the partition key (country) on the same physical machine or different machines.

Both sharding and partitioning are designed to enhance read/write operations and boost their speeds. Let’s look at the key architectural aspects, such as

Scalability: While partitions within a single machine are restricted to vertical scalability, limited by the CPU and memory capacity of that machine (meaning the number of…

--

--

Venkatesh Subramanian
Venkatesh Subramanian

Written by Venkatesh Subramanian

Product development & Engineering Leader| Software Architect | AI/ML | Cloud computing|https://www.linkedin.com/in/venkatesh-subramanian-377451b4/

Responses (2)