The MANAGE_DYNAMIC_PARTITION procedure is used to perform a dynamic partition management task, pre-creating future partitions and deleting expired partitions for dynamic partition tables in the current tenant.
Note
For OceanBase Database V4.3.5, the MANAGE_DYNAMIC_PARTITION procedure is supported starting from V4.3.5 BP2.
Syntax
DBMS_PARTITION.MANAGE_DYNAMIC_PARTITION (
precreate_time VARCHAR(64) DEFAULT NULL,
time_unit VARCHAR(64) DEFAULT NULL);
Parameters
| Parameter |
Description |
| precreate_time |
Optional. n {hour \| day \| week \| month \| year}.
- The default value is
null, indicating that no specific precreation time is specified.
- When explicitly specified, the larger value between the specified
precreate_time and the precreate_time value of the table is used as the precreation time when precreating partitions for dynamic partition tables.
|
| time_unit |
Optional. null \| hour \| day \| week \| month \| year.
- The default value is
null, indicating that the dynamic partition management task is executed for all dynamic partition tables.
- When the value is
hour, the dynamic partition management task is executed only for tables where time_unit is hour.
- When the value is
day, the dynamic partition management task is executed only for tables where time_unit is day.
- When the value is
week, the dynamic partition management task is executed only for tables where time_unit is week.
- When the value is
month, the dynamic partition management task is executed only for tables where time_unit is month.
- When the value is
year, the dynamic partition management task is executed only for tables where time_unit is year.
|
Examples
CALL DBMS_PARTITION.MANAGE_DYNAMIC_PARTITION();
CALL DBMS_PARTITION.MANAGE_DYNAMIC_PARTITION('3DAY');
CALL DBMS_PARTITION.MANAGE_DYNAMIC_PARTITION('3DAY', 'HOUR');
References
Dynamic partition management task