When & Why I need partitioning of my Databases?

Dhaval Thakur
2 min readNov 30, 2022

We usually build databases and forget about maintaining them for optimum utilization and performances.

One thing that is very important in terms of databases maintenance is partitioning.

Data Partitioning (Sharding) in System Design
Database Partitioning (Image Credits: Enjoy Algorithms)

What is partitioning?

Partitioning is functionality that allows tables, indexes, and index-organized tables to be subdivided into smaller pieces, enabling these database objects to be managed and accessed at a finer level of granularity.

Types of partitioning

  • Horizontal partitioning (Sharding) : Each partition is a separate data store, but all partitions have the same schema. Each partition is known as a shard and holds a specific subset of the data, such as all the orders for a specific set of customers.
  • Vertical partitioning: Each partition holds a subset of the fields for items in the data store. The fields are divided according to their pattern of use. For example, frequently accessed columns might be placed in one vertical partition and less frequently accessed columns in another.
  • Functional partitioning : Data is aggregated according to how it is used by each bounded context in the system.

Why you would need partitioning?

--

--

Dhaval Thakur

Data Enthusiast, Geek, part — time blogger. Every week 1 new Data Science/ Product Management story 🖥 I also write on Python, scripting & blockchain