Partition Indexes — Local vs Global and Query Routing
Partition Indexes — Local vs Global and Query Routing
Partitioning changes how indexes work. An index created on the parent table is automatically created on every partition (a "local" index). There are no global indexes across all partitions in PostgreSQL's declarative partitioning — queries that cannot prune partitions must scan every partition's index. Understanding this is essential to designing partition schemas that perform well.