When & Why I need partitioning of my Databases?
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.
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.