Help Center/
GaussDB/
Feature Guide(Centralized_8.x)/
Partitioned Table/
Automatic Partitioning/
Enabling/Disabling Automatic Partitioning/
Enabling/Disabling Automatic Range Partitioning
Updated on 2024-06-07 GMT+08:00
Enabling/Disabling Automatic Range Partitioning
You can run the ALTER TABLE SET INTERVAL command to enable or disable automatic range partitioning.
Enable automatic range partitioning.
gaussdb=# CREATE TABLE range_int (c1 int, c2 int) PARTITION BY RANGE (c1) ( PARTITION p1 VALUES LESS THAN (5), PARTITION p2 VALUES LESS THAN (10), PARTITION p3 VALUES LESS THAN (15) ); gaussdb=# ALTER TABLE range_int SET INTERVAL (5);
- To enable automatic range partitioning, ensure that no MAXVALUE partition key exists in the partitioned table.
- Automatic range partitioning supports only level-1 partitioned tables and single-column partition keys.
Disable automatic range partitioning.
gaussdb=# ALTER TABLE range_int SET INTERVAL (); -- Cleanup example gaussdb=# DROP TABLE range_int;
Parent topic: Enabling/Disabling Automatic Partitioning
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.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot