IT lexicon › Database › Range partition

Range partition

Database På svenska → Updated: 2026-05-28

Partitioning strategy: split data by range of partition-key values. Classic use: time-series where data is partitioned per month/quarter/year. PARTITION BY RANGE (created_at) + manually-create monthly partitions.

Postgres pg_partman extension automates partition maintenance (auto-create new monthly partition before needed, drop old). Win: partition pruning is effective for time-range queries (WHERE date BETWEEN X AND Y scans only 1-2 partitions instead of full-table scan). Distinct from hash partition: range partition is ordered → range queries work, but hot-partition risk for newest data. TimescaleDB is a PG extension that auto-range-partitions ("hypertables") + automatic-compression-of-old-data.

← Back to the lexicon