MERGE PARTITION
You can run this command to merge multiple partitions into one partition. Partitions can be merged only by specifying partition names, instead of partition values.
- This command cannot be applied to hash partitions.
- Running this command will invalidate the global index. You can use the UPDATE GLOBAL INDEX clause to update the global index synchronously or rebuild the global index.
For a range partition, the name of the new partition can be the same as that of the last source partition. For example, partitions p1 and p2 can be merged into p2. For a list partition, the name of the new partition can be the same as that of any source partition. For example, p1 and p2 can be merged into p1.
If the name of the new partition is the same as that of the source partition, the database considers the new partition as inheritance of the source partition.
You can run ALTER TABLE MERGE PARTITIONS to merge multiple partitions into one partition.
ALTER TABLE range_sales MERGE PARTITIONS date_202001, date_202002 INTO PARTITION date_2020_old UPDATE GLOBAL INDEX;
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