enable_partition_pruning

A configuration parameter determining whether partition pruning should be implemented

enable_partition_pruning is a configuration parameter determining whether partition pruning should be implemented by the planner.

enable_partition_pruning was added in PostgreSQL 11.

Usage

enable_partition_pruning enables the planner to take into account the definition of each partition and exclude it from being scanned if it does not contain any rows which would be returned by the query. This prevents expensive and unneccessary table scans.

constraint_exclusion is the equivalent parameter for tables using inheritance partitiioning.

Default value

The default value for enable_partition_pruning is: on.

Change history

Categories

GUC configuration item, Partitioning, Planner

See also

enable_partitionwise_join, enable_partitionwise_aggregate, constraint_exclusion