The MANAGE_DYNAMIC_PARTITION procedure is used to perform a dynamic partition management task for the current tenant, pre-creating future partitions and deleting expired partitions for dynamic partition tables.
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 VARCHAR2 DEFAULT NULL,
time_unit VARCHAR2 DEFAULT NULL);
Parameters
| Parameter |
Description |
| precreate_time |
Optional. n {hour \| day \| week \| month \| year}.
- The default value is
null, indicating that no precreation time is specified.
- When explicitly specified, the larger value between the specified
precreate_time and the precreate_time of the table is used as the precreation time.
|
| time_unit |
Optional. null \| hour \| day \| week \| month \| year.
- The default value is
null, indicating that the dynamic partition management task is performed for all dynamic partition tables.
- When the value is
hour, the dynamic partition management task is performed only for tables where time_unit is hour.
- When the value is
day, the dynamic partition management task is performed only for tables where time_unit is day.
- When the value is
week, the dynamic partition management task is performed only for tables where time_unit is week.
- When the value is
month, the dynamic partition management task is performed only for tables where time_unit is month.
- When the value is
year, the dynamic partition management task is performed 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