Partition Pruning
Partition pruning is a technology provided by GaussDB to optimize partitioned table queries. The database SQL engine scans only some specific partitions based on query conditions. When a partitioned table query meets the pruning conditions, partition pruning is automatically triggered. Partition pruning can be classified into static pruning and dynamic pruning based on the pruning phase. Static pruning is performed in the optimizer phase. Before a plan is generated, the database knows the partitions to be accessed. Dynamic pruning is performed in the executor phase (after the execution starts and before it ends). When a plan is generated, the database does not know the partitions to be accessed and only determines that partition pruning can be performed. The executor determines which partitions are pruned.
Partition pruning is triggered only by partitioned table page scan and local index scan. Global indexes do not involve partitioning and thus pruning is not required.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot