Theory of Intelligence
BACKEND ENGINEERING•Databases Concurrency And Caching•Scaling Data•3.2 Partitioning & Sharding

3.2.1 Partitioning

Subtopics: Partitioning and Sharding.

3.2.1 Partitioning

Postgres/MySQL can partition a table: orders_2026_01, orders_2026_02. Queries that filter on the partition key skip the rest.

Why it matters

Huge tables make vacuums, indexes, and deletes painful. Dropping an old partition is instant compared to DELETE.

How it is used

Partition time-series and logs by month. Always include the partition key in WHERE. This is not the same as sharding across machines.

Discuss theoretical concepts, mathematical formulas, and architectural foundations.

Supports inline code with `backticks`
No comments yet. Be the first to start the discussion!