Excluding whole partitions from a query based on the partition key

Partition pruning skips whole partitions a query cannot need

Partition pruning excludes entire partitions that cannot contain matching rows. It is different from using an index to find rows within a remaining partition, and it is not a page-level cache trick. PostgreSQL can perform this exclusion while planning a query or later when parameter values become available during execution. ...

February 13, 2028 · 5 min · XB Field Notes
One logical table with many physical pieces.

Table partitioning splits data by range or key

Range partitioning turns a boundary definition into a write-routing rule. PostgreSQL places a row in the partition whose bounds accept its key, whether the row arrives on time or months late. Correct boundaries, compatible timestamp types, and a plan for missing ranges matter before any query can benefit from pruning. ...

February 10, 2028 · 5 min · XB Field Notes