The MANAGE_DYNAMIC_PARTITION system package manages dynamic partitioning tasks, such as precreating future partitions and dropping expired partitions, for dynamic partitioning tables in the current tenant.
Note
For OceanBase Database V4.3.5, the subprogram MANAGE_DYNAMIC_PARTITION 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. Valid values: n {hour \| day \| week \| month \| year}.
- The default value is
null, which specifies not to precreate partitions by using the specified time.
- If you explicitly specify the parameter, the system uses the larger value between the specified
precreate_time and precreate_time of the table for precreating partitions.
|
| time_unit |
Optional. Valid values: null \| hour \| day \| week \| month \| year.
- The default value is
null, which specifies to manage dynamic partitioning tasks for all dynamic partitioning tables in the tenant.
- If you set the parameter to
hour, the system manages dynamic partitioning tasks only for tables whose time_unit value is hour.
- If you set the parameter to
day, the system manages dynamic partitioning tasks only for tables whose time_unit value is day.
- If you set the parameter to
week, the system manages dynamic partitioning tasks only for tables whose time_unit value is week.
- If you set the parameter to
month, the system manages dynamic partitioning tasks only for tables whose time_unit value is month.
- If you set the parameter to
year, the system manages dynamic partitioning tasks only for tables whose time_unit value 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 tasks