How to scale relational database?

Presentations

How to scale relational database?

Relation databases

Two distinct terms

Partitioning

Why partitioning?

Partitioning is not

A real problematic part

Partitioning in Postgres

CREATE TABLE reports
       ...
       ...
       ...
       PARTITION BY range(org_id)
CREATE TABLE reports
       ...
       ...
       ...
       PARTITION OF changed_at FOR VALUES FROM (2020-01-01) TO (2020-12-31)
ALTER TABLE report DETACH PARTITION foobar

Howto

Good part of relational databases

Fallacies of distributed computing

Anyway…we need to scale/replicate from time to time

Replication

Shard(s)

Shards can be replicated too