Partitioning divides one logical PostgreSQL table into physical child tables. It can improve pruning, lifecycle operations, index size, or noisy-neighbor isolation when queries reliably include the partition key. It also multiplies indexes, statistics, migrations, and planning work. Choose tenant, time, language, or model partitions from measured query and operational needs—not row count alone.
Every partition needs appropriate relational and vector indexes. Automated creation must be idempotent and monitored.
The planner can skip partitions when predicates constrain the partition key. A query lacking that predicate may scan many ANN indexes and merge candidates. Test the exact production SQL; implicit casts or functions can prevent expected pruning.
Compare unpartitioned and candidate designs with actual tenant/time distribution. Inspect EXPLAIN for pruning, planning time, index sizes, insert routing, retention operations, and cross-partition top-k quality. Test default partitions and missing future partitions.
Evaluate partitioning for this pgvector table [schema, distributions, queries, retention]. Compare no partitioning, tenant, time, language, model, and hash. Include pruning evidence, ANN indexes, global top-k merge, uniqueness, automation, maintenance, and rollback.
Verification contract: Approve partitioning only when a production-shaped benchmark shows a measurable benefit greater than the operational cost.