Cardinality is the number or diversity of distinct values in a set or key column. For PostgreSQL partitioning, a partition key needs sufficient cardinality to distribute rows evenly; otherwise partitions may become unbalanced or contain only a few rows. section 4.2
A timestamp key with useful cardinality
Partitioning erp.payments by monthly ranges of tstamp distributes 150,001,000 rows across time-based partitions. A query filtering on tstamp can use partition pruning and scan only payments_p_2022_3 instead of the entire table. section 4.2







