Skip to main content

What is partitioning (partitioning)?

Partitioning is a way to split a large database table into several smaller, logically related parts, called partitions.

It looks like one table, but the data is physically stored in separate segments - by date, value range, category, and so on.

The main types

  1. Range partitioning, splitting by a value range, e.g. by date: January goes into one partition, February into another.
  2. List partitioning, splitting by specific values: region "Kyiv" goes into one partition, "Lviv" into another.
  3. Hash partitioning, data is distributed via a hash function to evenly balance the partitions.
  4. Composite partitioning, a combination of several methods (e.g. by date and by region).

Why it's needed

  • It speeds up queries, since lookups only touch the relevant partition.
  • It simplifies maintenance, old data can be archived or deleted without affecting the rest.
  • It reduces write locking.
  • It improves scalability, tables with billions of rows become manageable.

In short, partitioning is a way to "slice" a huge table into convenient pieces without losing data integrity.

Short Answer

Interview ready
Premium

A concise answer to help you respond confidently on this topic during an interview.