Splitting a Partition for a Range Partitioned Table
You can run ALTER TABLE SPLIT PARTITION to split a partition for a range partitioned table.
ALTER TABLE range_sales SPLIT PARTITION date_202001 AT ('2020-01-16') INTO ( PARTITION date_202001_p1, -- The upper boundary of the first partition is '2020-01-16'. PARTITION date_202001_p2 -- The upper boundary of the second partition is '2020-02-01'. ) UPDATE GLOBAL INDEX;
ALTER TABLE range_sales SPLIT PARTITION date_202001 INTO ( PARTITION date_202001_p1 VALUES LESS THAN ('2020-01-11'), PARTITION date_202001_p2 VALUES LESS THAN ('2020-01-21'), PARTITION date_202001_p3 -- The upper boundary of the third partition is '2020-02-01'. )UPDATE GLOBAL INDEX;
ALTER TABLE range_sales SPLIT PARTITION FOR ('2020-01-15') AT ('2020-01-16') INTO ( PARTITION date_202001_p1, -- The upper boundary of the first partition is '2020-01-16'. PARTITION date_202001_p2 -- The upper boundary of the second partition is '2020-02-01'. ) UPDATE GLOBAL INDEX;
If the MAXVALUE partition is split, the MAXVALUE range cannot be declared for the first several partitions, and the last partition inherits the MAXVALUE range.
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