Skip to main content
Version: V1.0.0

MANAGE_DYNAMIC_PARTITION

MANAGE_DYNAMIC_PARTITION is used to perform a dynamic partition management task to precreate future partitions and delete expired partitions for a dynamic partition table.

Syntax

DBMS_PARTITION.MANAGE_DYNAMIC_PARTITION (
precreate_time VARCHAR(64) DEFAULT NULL,
time_unit VARCHAR(64) DEFAULT NULL);

Parameters

ParameterDescription
precreate_timeOptional. n {hour | day | week | month | year}.
  • The default value is null, indicating that the precreate time is not specified.
  • When explicitly specified, the larger value between the specified precreate_time and the precreate_time of the table is used as the precreate time when precreating partitions for a dynamic partition table.
time_unitOptional. 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 with time_unit set to hour.
  • When the value is day, the dynamic partition management task is performed only for tables with time_unit set to day.
  • When the value is week, the dynamic partition management task is performed only for tables with time_unit set to week.
  • When the value is month, the dynamic partition management task is performed only for tables with time_unit set to month.
  • When the value is year, the dynamic partition management task is performed only for tables with time_unit set to year.

Examples

CALL DBMS_PARTITION.MANAGE_DYNAMIC_PARTITION();
CALL DBMS_PARTITION.MANAGE_DYNAMIC_PARTITION('3DAY');
CALL DBMS_PARTITION.MANAGE_DYNAMIC_PARTITION('3DAY', 'HOUR');